Finished functionality and tests