Added standalone mode and touched up headers