Removed some useless variables
Modified header