Cleaned up source code