Improved lot of logic, removed useless code, removed adapter implementation