added SAPI class, im having some philosophical issues about the config