Small bugfixes. Added flexibility.
Wrote compile script.