hooks removed. Some cleanup left. Already tested code. Compiling