Hehe... these functions definitely need some refactoring. Will cover all of your points (realloc, alpha, try/except) shortly