Bug Fixes: #11, #9, #5, #12