Fixed a number of errors introduced by another member... please avoid committing code that wont build!