Moving stuff to rectangle.js