Rebuilt completely based on Fastshell