Updated code, removed enormous block of commented out useless stuff