Misc removed unused code