Add pkg directory
Fix some syntax xissues