Fixed bug on penetra_set_alloc_type. Fixed some code styles.
Added docs.