some housekeeping and refactoring for git