code cleanup & working release build