Align datatable UI to bootstrap

Minor bug fixes and code tidying done too.