add licence, fix some tab/spaces issues, add construct block

turn default constructor into construct block