Organized code for easier manipulation

Organized all files in headers. Made all headers use macros. Redid the
Makefile to account for the new headers. Also added the configure option
in case of denied permissions.