Established separation of header and implementation. Also added makefile.