Modularise and add rpm building