Flux Layout - code refactoring

Code tidying.