Removed all obsolete code from main.m