Cleaned up text and added comments