added mouse moded and cleaned up a bit