Some structural and interface changes
Formatting fix
Fixed certain spots to match the implementation