made some relocations, made app more modular