Fixed copyright and license information
Add group support
Switch from mysqli to PDO database connection
Switch to prepared statements to prevent injections
Move database stuff to extra class for reuse