Fixed various issue with CA creations
Added comments; removed whitespace