added filesystem deploy, various refactoring, introducing singletons where needed