made some modifications dedicated to testability
added some classnames for easier element selection
added more tests