Margin changes and bug fixes