Fix margins, remove unused code