Refactored architecture
Added some improvements