Further refactor, create useful module interface.