minor code nicening and indentation fixes