copyright notice adapted, closing php tags removed, code formatting, closes #83