Added windows service; reimplemented core functionality;