Migrate to pure Julia

Move away from ccalls to using more Julian idioms