Finishing interval stuff (currently broken).
Added header files.