More bug fixes, some file reorg, updates on the UI