fixed styles, formatting, added check for title