get edit posts working and fix up routing