added msg argument for collisions
unified class layout and general clean up