adding comments, cleaning up code, removing unnecessary linked libraries