Styling and bug fixes

Styling and bug fixes