Code cleanup and disabling of rarly used functionality