Now catagorizes. Code is still horrible.