Made project file more robust

also moved struct to header and changed to class