Flux Layout - refactoring

Tidy up code.