Added some new functions, gambiarra in proccess.