Base logic is nearly done