Move things around into actual packages
Move to a more robust regexp