My only advice would be to ditch libc dependencies and build out things from scratch, and try for simpler approaches. I think you'll find the excercise good for you as a programmer, and good for your project here. Looking at a current libc implementation may help.