Fixed small bug. Changed interface