Style
Added missing copyright/license header
Strenghtened unit tests
Minor fixes