added some commenting and styling