Made the app look slightly better and added more robust code handling