Completely refactor code to fit with microbe (again)