bugfixing and some refactoring
added file and block injections