fix a number of sizing/positioning issues; margin now via css; added tests.