refactor to use javascript object for margins
removed all extra transforms