added UI features and refactored some code -- turning this version in