Initial import

Still some code note imported. Those still need some work (notably the
sine stuff).