Reafctored most parts and did some unification