various changes to make the code work correctly with sourcetree