Reformatted code a bit

Less hard coding and silly stuff