Removed unneeded code in main and tunit