enabling and fixing warnings
refactor into modules