Update code

Update some code and functions