Uninitialized value
Reorder some checks, build a library