Split functionality into separate files and added ASD