significant refactor , implementing interfaces and organized directories