Now it's readable... my code was too messy