Implemented better reset method (no page refresh)