Reworked the comment parsing behavior a bit
Reformatted code, changed comments to docstrings