minor style refactor and typesetting is all set