Bugfixes; added bash script for compiling