HUGE refactor

Signed-off-by: ShadowChild <shadychild12@gmail.com>