Base Commit

Borrowed some code from Hysteria