mantle refactoring. Close #17