Add new functions, remake some old functions.

Signed-off-by: 80LevelElf <salahutd@gmail.com>