Added comments and a few other features