Modest refactoring of python API

Some bug fixes and a more flexible attribute lookup for the Project class.