Tested everything and added comments why things are like they are.