Improved interface + fixed bugs