Code cleanup as well as creation of platform interface