Updated forge, some bugfixing and refactoring