Moving some stuff around. Working version