re-factored code a little using code from the Solution: New Post video (mostly styling + additional validations)