Moved more stuff to scala