Updated several components

Made core reusable
Created beginning for the installer script
Centralized mail functions