Cleaning up implementation of karka