Cleaned up the source code