Last optimizations on the main class.

Signed-off-by: AndroWiiid <androwiiid@gmail.com>