fixed several warnings, cosmetics and removed message stack