Flux Layout - fix columns width bug & refactoring

Fix bug in columns calculation and a little tidying.