FIX: Ordering. Tidy up js