Refactored. Developing fragment support.