API work and Documentation

API totally changed to PDO, there are no more MySQL references in the
whole application!