in the last century it had grown from a country house with attached farm buildings to a place with a main street , a market square , and , since the railway had touched its northern edge , some new factories by the track .