Made makefile. Rewrited a lot of stuff.