Optimize some things

Signed-off-by: Clienthax <clienthax@gmail.com>