Clustering code and bunch of changes to preprocessor