Fixed some CS issues and moved adapter map into a separate file.