bug fixes and gui update, removed extraneous code