Fixed project properties, cleaned up code.