Removes unused code
Implements new design