I've tried to reduce the code as much as I can and see what is really needed in here and I think the rest still needed in here.