Moved pyrl files to package

And fixed a whole lot of imports. It works but I didn't
test extensively.