Cleaned code and added support for intents