Change folder structure. Refactor some common funcs into tools package. Add initial internalization support.