Some API added

I'll add the whole code in the next days
New addition and some rule cleaned and optimized