Updated for Ubuntu 14.04, fixed most errors