merged Igor's change, fixed issue#436, changed header's layout and so on