Swm version

I've get many trouble with your code, syntax error and "base_dir" var that does not exist. I can certify that it work ;)