Cleaned up code, removed unneeded files, added comments.