Split up rattle.py into modules