make pcsa struct public
replace trailing zero functions with built-in method
Rearrange for proper package layout