Removed most gui related code