Structured and commented code. Made the reset program functionality better. Added _.end() function