Refactoring margin auto issue

Upon Mark Wunsch's invaluable advice, I refactored my previous
commit accounting for margin being returned 'auto'.

(Previous Commit: 3950e046c02a320f341b7efc7f2977c1f454fda7)