Changes made based on code review. Re-organized imports, improved docstrings, comments, removed errant code