Problems with a 4051 multiplexer

I found a solution to my problem. I found a library for the 4051 mux, it makes everything hell of alot more easier and understandable by new people.
I noticed there are no sticky threads in the forum so im posting it as very usefull information.