Code Cleanup and Button Addition