Refactor, new modules and update Gradle config