custom exceptions in libuni + complete rehaul of uni.py