Got the code pretty clean... not perfect, but definitely better