Converted eveything to scala!