Code written from various java lessons