Fixed reset issue with sketch and refactored constants