Refactored project and added some documentation.