Changed version from 0.3.1 to 0.4 in relevant files and fixed documentation.