Move the base plugin to a separate file

The extensions file was getting too big.