Fixed structuring issues in code base