Some style changes an test code fixed