Some comments added, minor code fixes plus ui changes.