refactoring of constructor and constant buffer changes