Merge pull request #6 from POWER-Morzh/master

Use of arrays on device
added misc optimizations, refactored some parts of code
modified documentation
removed commented code
Copy from device memory in global memory function implemented