Adam: fixing the code I mistakenly overwrote & a lot of structure put in for swing GUI