Cleaned code and started on documentation.