Error detection (main) moved to error.c (voids)