minor changes in layout and internal function names