Redesign and refactor

Redesign and refactor