Add majority of core

Still need to sort out const-ness for basically everything