Several functionality edits