Fixed indentation.
Fixed typos and removed try catches that were not needed. Also added a keySizeBytes var to clarify a convertion between bits and bytes as Thynix suggested.