Updated machine structure, and started to refactor code to use machine instead of varius inputs...