Update/style

Cleanup and update to new style.
Fix bugs.