Fixed some compilation issues from copying over Tim's files