Refactor, support for more stuff