Added more source files and modified existing ones to be more object oriented.