cleaned out unnecesary files and moved inline device functions to functions.h