Added reset functionality
Fixed some API stuff