Deprecate constants, removed unused code, fix debugging pieces