Some minor changes in model; new editPost function