Added reset and fixed some minor issues