Fixed documentation warnings, issue #46
Fixed CUDA warnings and errors, #43
Fixed merge