Changed up structure and added mouse functions