Added all needed functionality. Ready for deploying.