This is a work in progress and may still be buggy!