code refactoring of Station code and tests