Even though it's still ugly, committing because the functionality is all working