Added single posts and moved some logic to the model