Fixing bugs and adding options