Cleanup and more comments added