Rearranged includes, added functions for automatically choosing a computation device based on specifications.