clustering + refactoring layout

fixes #287 #288 #274