Cleaned up pointer, malloc, and function call errors, rel_read now compiles