Repository: onflow/flow-cli
Pull request #150 (2021-04-06 10:21:17)

Sharedlib imports
## Description
License headers added
______

For contributor use:

- [ ] Targeted PR against `master` branch
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work
- [ ] Code follows the [standards mentioned here](https://github.com/onflow/flow-cli/blob/master/CONTRIBUTING.md#styleguides)
- [ ] Updated relevant documentation
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Added appropriate labels



Patch:
diff --git a/.golangci.yml b/.golangci.yml
index b25be26b..00378cd9 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -11,7 +11,6 @@ linters:
     - typecheck
     - misspell
     - goimports
-    - unused
 linters-settings:
   goimports:
     # put imports beginning with prefix after 3rd-party package
diff --git a/cmd/flow/main.go b/cmd/flow/main.go
index 93cbf7f6..9f5cb2cf 100644
--- a/cmd/flow/main.go
+++ b/cmd/flow/main.go
@@ -27,7 +27,6 @@ import (
 	"github.com/onflow/flow-cli/internal/cadence"
 	"github.com/onflow/flow-cli/internal/collections"
 	"github.com/onflow/flow-cli/internal/command"
-	"github.com/onflow/flow-cli/internal/config"
 	"github.com/onflow/flow-cli/internal/emulator"
 	"github.com/onflow/flow-cli/internal/events"
 	"github.com/onflow/flow-cli/internal/keys"
@@ -44,10 +43,6 @@ func main() {
 		TraverseChildren: true,
 	}
 
-	// hot commands
-	config.InitCommand.AddToParent(cmd)
-
-	// structured commands
 	cmd.AddCommand(cadence.Cmd)
 	cmd.AddCommand(version.Cmd)
 	cmd.AddCommand(emulator.Cmd)
diff --git a/docs/developer-updates/release-notes-v17.md b/docs/developer-updates/release-notes-v17.md
index fd81d58a..7dd5e4aa 100644
--- a/docs/developer-updates/release-notes-v17.md
+++ b/docs/developer-updates/release-notes-v17.md
@@ -6,7 +6,8 @@ Follow the [Flow CLI installation guide](https://docs.onflow.org/flow-cli/instal
 
 ### Initializing Configuration
 Configuration format was unified to work for all CLI commands.
-Generating new configuration is done by executing command `flow init`.
+Generating new configuration is done by executing command `flow project init`.
+Command `flow init` was removed as it provides the same functionality as project init command.
 
 ###⚠️  No longer supported flags
 
diff --git a/docs/developer-updates/v17.md b/docs/developer-updates/v17.md
index 8a3f6f00..50ec508c 100644
--- a/docs/developer-updates/v17.md
+++ b/docs/developer-updates/v17.md
@@ -117,7 +117,8 @@ Tokens Unstaking: 	 0.00000000
 
 ### Initializing Configuration
 Configuration format was unified to work for all CLI commands. 
-Generating new configuration is done by executing command `flow init`. 
+Generating new configuration is done by executing command `flow project init`. 
+Command `flow init` was removed as it provides the same functionality as project init command. 
 
 ###⚠️  No longer supported flags 
 
diff --git a/docs/initialize-configuration.md b/docs/initialize-project.md
similarity index 86%
rename from docs/initialize-configuration.md
rename to docs/initialize-project.md
index bca85847..3c9b9c1f 100644
--- a/docs/initialize-configuration.md
+++ b/docs/initialize-project.md
@@ -1,7 +1,7 @@
 ---
-title: Initialize Flow Configuration
-sidebar_title: Initialize Configuration
-description: How to initialize Flow configuration using CLI
+title: Initialize a Flow Project
+sidebar_title: Initialize a Project
+description: How to initialize a new Flow project with the CLI
 ---
 
 Flow CLI uses a state to operate which is called configuration (usually `flow.json` file). 
@@ -9,19 +9,19 @@ Before using commands that require this configuration we must initialize the pro
 using the init command. Read more about [state configuration here](https://docs.onflow.org/flow-cli/configuration/).
 
 ```shell
-flow init
+flow project init
 ```
 
 ## Example Usage
 
 ```shell
-> flow init
+> flow project init
 
 Configuration initialized
 Service account: 0xf8d6e0586b0a20c7
 
-Start emulator by running: 'flow emulator' 
-Reset configuration using: 'flow init --reset'
+Start emulator by running: 'flow emulator start' 
+Reset configuration using: 'flow init --rest'
 
 ```
 
diff --git a/docs/start-emulator.md b/docs/start-emulator.md
index c5c4c800..ece2bcba 100644
--- a/docs/start-emulator.md
+++ b/docs/start-emulator.md
@@ -7,9 +7,9 @@ description: How to start Flow emulator from the command line
 The Flow CLI provides a command to start an emulator. 
 The Flow Emulator is a lightweight tool that emulates the behaviour of the real Flow network.
 
-`flow emulator`
+`flow emulator start`
 
-⚠️ The emulator command expects configuration to be initialized. See [flow init](https://docs.onflow.org/flow-cli/initialize-configuration/) command.
+⚠️ The emulator command expects configuration to be initialized. See [project init](https://docs.onflow.org/flow-cli/initialize-project/) command.
 
 
 ## Example Usage
@@ -33,11 +33,3 @@ To learn more about using the Emulator, have a look at the [README of the reposi
 
 Specify a filename for the configuration files, you can provide multiple configuration
 files by using `-f` flag multiple times.
-
-### Initialize
-
-- Flag: `--init`
-
-⚠️  Deprecated: use `flow init` instead.
-
-Initialize configuration during the command execution.
\ No newline at end of file
diff --git a/internal/accounts/account-add.go b/internal/accounts/account-add.go
new file mode 100644
index 00000000..478b64ba
--- /dev/null
+++ b/internal/accounts/account-add.go
@@ -0,0 +1,106 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package accounts
+
+import (
+	"bytes"
+	"fmt"
+	"text/tabwriter"
+
+	"github.com/spf13/cobra"
+
+	"github.com/onflow/flow-cli/internal/command"
+	"github.com/onflow/flow-cli/pkg/flowcli/project"
+	"github.com/onflow/flow-cli/pkg/flowcli/services"
+	"github.com/onflow/flow-cli/pkg/flowcli/util"
+)
+
+type flagsAdd struct {
+	KeySigAlgo  string `default:"ECDSA_P256" flag:"sig-algo" info:"Signature algorithm"`
+	KeyHashAlgo string `default:"SHA3_256" flag:"hash-algo" info:"Hashing algorithm"`
+	KeyIndex    int    `flag:"index" info:"Account key index"`
+	KeyHex      string `flag:"private-key" info:"Private key in hex format"`
+	Overwrite   bool   `flag:"overwrite" info:"Overwrite an existing account"`
+}
+
+var addFlags = flagsAdd{}
+
+var AddCommand = &command.Command{
+	Cmd: &cobra.Command{
+		Use:     "add <name> <address>",
+		Short:   "Add account to config",
+		Example: `flow accounts add alice 18d6e0586b0a20c5 --private-key=11c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7`,
+		Args:    cobra.ExactArgs(2),
+	},
+	Flags: &addFlags,
+	Run: func(
+		cmd *cobra.Command,
+		args []string,
+		globalFlags command.GlobalFlags,
+		services *services.Services,
+	) (command.Result, error) {
+		account, err := services.Accounts.Add(
+			args[0], // name
+			args[1], // address
+			addFlags.KeySigAlgo,
+			addFlags.KeyHashAlgo,
+			addFlags.KeyIndex,
+			addFlags.KeyHex,
+			addFlags.Overwrite,
+			util.ConfigPath,
+		)
+		if err != nil {
+			return nil, err
+		}
+
+		return &AccountAddResult{account}, nil
+	},
+}
+
+// AccountAddResult is the result from the "flow accounts add" command.
+type AccountAddResult struct {
+	*project.Account
+}
+
+func (r *AccountAddResult) JSON() interface{} {
+	return r
+}
+
+func (r *AccountAddResult) String() string {
+	var b bytes.Buffer
+	writer := tabwriter.NewWriter(&b, 0, 8, 1, '\t', tabwriter.AlignRight)
+
+	fmt.Fprintf(writer, "Address\t 0x%s\n", r.Account.Address())
+	fmt.Fprintf(writer, "Hash Algo\t %s\n", r.Account.DefaultKey().HashAlgo())
+	fmt.Fprintf(writer, "Signature Algo\t %s\n", r.Account.DefaultKey().SigAlgo())
+	fmt.Fprintf(writer, "Key Index\t %d\n", r.Account.DefaultKey().Index())
+
+	writer.Flush()
+
+	return b.String()
+}
+
+func (r *AccountAddResult) Oneliner() string {
+	return fmt.Sprintf(
+		"Address: 0x%s, Hash Algo: %s, Sig Algo: %s",
+		r.Address(),
+		r.Account.DefaultKey().HashAlgo(),
+		r.Account.DefaultKey().SigAlgo(),
+	)
+}
diff --git a/internal/accounts/accounts.go b/internal/accounts/accounts.go
index ea5fc3b2..3733de29 100644
--- a/internal/accounts/accounts.go
+++ b/internal/accounts/accounts.go
@@ -50,33 +50,7 @@ type AccountResult struct {
 
 // JSON convert result to JSON
 func (r *AccountResult) JSON() interface{} {
-	result := make(map[string]interface{})
-	result["address"] = r.Address
-	result["balance"] = r.Balance
-
-	keys := make([]string, 0)
-	for _, key := range r.Keys {
-		keys = append(keys, fmt.Sprintf("%x", key.PublicKey.Encode()))
-	}
-
-	result["keys"] = keys
-
-	contracts := make([]string, 0)
-	for name := range r.Contracts {
-		contracts = append(contracts, name)
-	}
-
-	result["contracts"] = contracts
-
-	if r.showCode {
-		c := make(map[string]string)
-		for name, code := range r.Contracts {
-			c[name] = string(code)
-		}
-		result["code"] = c
-	}
-
-	return result
+	return r
 }
 
 // String convert result to string
@@ -123,3 +97,8 @@ func (r *AccountResult) Oneliner() string {
 
 	return fmt.Sprintf("Address: 0x%s, Balance: %v, Public Keys: %s", r.Address, r.Balance, keys)
 }
+
+func (r *AccountResult) ToConfig() string {
+	// TODO: it would be good to have a --save-config flag and it would be added to config
+	return ""
+}
diff --git a/internal/accounts/contract-add.go b/internal/accounts/contract-add.go
index a71bdf1c..caae96d9 100644
--- a/internal/accounts/contract-add.go
+++ b/internal/accounts/contract-add.go
@@ -29,7 +29,7 @@ import (
 
 type flagsAddContract struct {
 	Signer  string `default:"emulator-account" flag:"signer"`
-	Results bool   `default:"false" flag:"results" info:"⚠️  Deprecated: results are provided by default"`
+	Results bool   `default:"false" flag:"results" info:"⚠️  No longer supported: results are provided by default"`
 }
 
 var addContractFlags = flagsAddContract{}
@@ -49,7 +49,7 @@ var AddContractCommand = &command.Command{
 		services *services.Services,
 	) (command.Result, error) {
 		if createFlags.Results {
-			fmt.Println("⚠️ DEPRECATION WARNING: results flag is deprecated, results are by default included in all executions")
+			return nil, fmt.Errorf("⚠️ Results flag is no longer supported, results are by default included in all executions.")
 		}
 
 		account, err := services.Accounts.AddContract(
diff --git a/internal/accounts/contract-remove.go b/internal/accounts/contract-remove.go
index 9db8d0b5..08fcde5c 100644
--- a/internal/accounts/contract-remove.go
+++ b/internal/accounts/contract-remove.go
@@ -29,7 +29,7 @@ import (
 
 type flagsRemoveContract struct {
 	Signer  string `default:"emulator-account" flag:"signer"`
-	Results bool   `default:"false" flag:"results" info:"⚠️  Deprecated: results are provided by default"`
+	Results bool   `default:"false" flag:"results" info:"⚠️  No longer supported: results are provided by default"`
 }
 
 var flagsRemove = flagsRemoveContract{}
@@ -48,8 +48,8 @@ var RemoveCommand = &command.Command{
 		globalFlags command.GlobalFlags,
 		services *services.Services,
 	) (command.Result, error) {
-		if flagsRemove.Results {
-			fmt.Println("⚠️ DEPRECATION WARNING: results flag is deprecated, results are by default included in all executions")
+		if createFlags.Results {
+			return nil, fmt.Errorf("⚠️ Results flag is no longer supported, results are by default included in all executions.")
 		}
 
 		account, err := services.Accounts.RemoveContract(
diff --git a/internal/accounts/contract-update.go b/internal/accounts/contract-update.go
index d2a12d82..faeb27e6 100644
--- a/internal/accounts/contract-update.go
+++ b/internal/accounts/contract-update.go
@@ -29,7 +29,7 @@ import (
 
 type flagsUpdateContract struct {
 	Signer  string `default:"emulator-account" flag:"signer"`
-	Results bool   `default:"false" flag:"results" info:"⚠️  Deprecated: results are provided by default"`
+	Results bool   `default:"false" flag:"results" info:"⚠️  No longer supported: results are provided by default"`
 }
 
 var updateFlags = flagsUpdateContract{}
@@ -48,8 +48,8 @@ var UpdateCommand = &command.Command{
 		globalFlags command.GlobalFlags,
 		services *services.Services,
 	) (command.Result, error) {
-		if updateFlags.Results {
-			fmt.Println("⚠️ DEPRECATION WARNING: results flag is deprecated, results are by default included in all executions")
+		if createFlags.Results {
+			return nil, fmt.Errorf("⚠️ Results flag is no longer supported, results are by default included in all executions.")
 		}
 
 		account, err := services.Accounts.AddContract(
diff --git a/internal/accounts/create.go b/internal/accounts/create.go
index 79ec561d..b02bebde 100644
--- a/internal/accounts/create.go
+++ b/internal/accounts/create.go
@@ -34,7 +34,7 @@ type flagsCreate struct {
 	HashAlgo  string   `default:"SHA3_256" flag:"hash-algo" info:"Hash used for the digest"`
 	Name      string   `default:"default" flag:"name" info:"Name used for saving account"`
 	Contracts []string `flag:"contract" info:"Contract to be deployed during account creation. <name:filename>"`
-	Results   bool     `default:"false" flag:"results" info:"⚠️  Deprecated: results are provided by default"`
+	Results   bool     `default:"false" flag:"results" info:"⚠️  No longer supported: results are provided by default"`
 }
 
 var createFlags = flagsCreate{}
@@ -53,7 +53,7 @@ var CreateCommand = &command.Command{
 		services *services.Services,
 	) (command.Result, error) {
 		if createFlags.Results {
-			fmt.Println("⚠️ DEPRECATION WARNING: results flag is deprecated, results are by default included in all executions")
+			return nil, fmt.Errorf("⚠️ Results flag is no longer supported, results are by default included in all executions.")
 		}
 
 		account, err := services.Accounts.Create(
diff --git a/internal/accounts/get.go b/internal/accounts/get.go
index 7a9309b3..dc38c950 100644
--- a/internal/accounts/get.go
+++ b/internal/accounts/get.go
@@ -29,7 +29,7 @@ import (
 
 type flagsGet struct {
 	Contracts bool `default:"false" flag:"contracts" info:"Display contracts deployed to the account"`
-	Code      bool `default:"false" flag:"code" info:"⚠️  Deprecated: use contracts flag instead"`
+	Code      bool `default:"false" flag:"code" info:"⚠️  No longer supported: use contracts flag instead"`
 }
 
 var getFlags = flagsGet{}
@@ -48,7 +48,7 @@ var GetCommand = &command.Command{
 		services *services.Services,
 	) (command.Result, error) {
 		if getFlags.Code {
-			fmt.Println("⚠️  DEPRECATION WARNING: use contracts flag instead")
+			return nil, fmt.Errorf("⚠️  No longer supported: use contracts flag instead")
 		}
 
 		account, err := services.Accounts.Get(args[0]) // address
@@ -58,7 +58,7 @@ var GetCommand = &command.Command{
 
 		return &AccountResult{
 			Account:  account,
-			showCode: getFlags.Contracts || getFlags.Code,
+			showCode: getFlags.Contracts,
 		}, nil
 	},
 }
diff --git a/internal/accounts/staking-info.go b/internal/accounts/staking-info.go
index 7c503f05..fe735652 100644
--- a/internal/accounts/staking-info.go
+++ b/internal/accounts/staking-info.go
@@ -1,3 +1,21 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package accounts
 
 import (
diff --git a/internal/blocks/blocks.go b/internal/blocks/blocks.go
index 282f2e5b..ec7108c2 100644
--- a/internal/blocks/blocks.go
+++ b/internal/blocks/blocks.go
@@ -51,11 +51,11 @@ type BlockResult struct {
 // JSON convert result to JSON
 func (r *BlockResult) JSON() interface{} {
 	result := make(map[string]interface{})
-	result["blockID"] = r.block.ID.String()
-	result["parentID"] = r.block.ParentID.String()
-	result["height"] = r.block.Height
-	result["totalSeals"] = len(r.block.Seals)
-	result["totalCollections"] = len(r.block.CollectionGuarantees)
+	result["BlockID"] = r.block.ID.String()
+	result["ParentID"] = r.block.ParentID.String()
+	result["Height"] = r.block.Height
+	result["TotalSeals"] = len(r.block.Seals)
+	result["TotalCollections"] = len(r.block.CollectionGuarantees)
 
 	collections := make([]interface{}, 0)
 	for i, guarantee := range r.block.CollectionGuarantees {
@@ -67,13 +67,13 @@ func (r *BlockResult) JSON() interface{} {
 			for _, tx := range r.collections[i].TransactionIDs {
 				txs = append(txs, tx.String())
 			}
-			collection["transactions"] = txs
+			collection["Transactions"] = txs
 		}
 
 		collections = append(collections, collection)
 	}
 
-	result["collection"] = collections
+	result["Collection"] = collections
 	return result
 }
 
diff --git a/internal/command/command.go b/internal/command/command.go
index e8b0e86d..78db3de6 100644
--- a/internal/command/command.go
+++ b/internal/command/command.go
@@ -52,23 +52,21 @@ type Command struct {
 }
 
 type GlobalFlags struct {
-	Filter     string
-	Format     string
-	Save       string
-	Host       string
-	Log        string
-	Network    string
-	ConfigPath []string
+	Filter  string
+	Format  string
+	Save    string
+	Host    string
+	Log     string
+	Network string
 }
 
 var flags = GlobalFlags{
-	Filter:     "",
-	Format:     "",
-	Save:       "",
-	Host:       "",
-	Log:        "info",
-	Network:    "",
-	ConfigPath: project.DefaultConfigPaths,
+	Filter:  "",
+	Format:  "",
+	Save:    "",
+	Host:    "",
+	Log:     "info",
+	Network: "",
 }
 
 // InitFlags init all the global persistent flags
@@ -114,10 +112,10 @@ func InitFlags(cmd *cobra.Command) {
 	)
 
 	cmd.PersistentFlags().StringSliceVarP(
-		&flags.ConfigPath,
+		&util.ConfigPath,
 		"conf",
 		"f",
-		flags.ConfigPath,
+		util.ConfigPath,
 		"Path to flow configuration file",
 	)
 
@@ -137,7 +135,7 @@ func InitFlags(cmd *cobra.Command) {
 func (c Command) AddToParent(parent *cobra.Command) {
 	c.Cmd.Run = func(cmd *cobra.Command, args []string) {
 		// initialize project but ignore error since config can be missing
-		proj, err := project.Load(flags.ConfigPath)
+		proj, err := project.Load(util.ConfigPath)
 		// here we ignore if config does not exist as some commands don't require it
 		if !errors.Is(err, config.ErrDoesNotExist) {
 			handleError("Config Error", err)
@@ -221,16 +219,18 @@ func createLogger(logFlag string, formatFlag string) output.Logger {
 // formatResult formats a result for printing.
 func formatResult(result Result, filterFlag string, formatFlag string) (string, error) {
 	if result == nil {
-		return "", fmt.Errorf("missing result")
+		return "", fmt.Errorf("Missing")
 	}
 
 	if filterFlag != "" {
-		value, err := filterResultValue(result, filterFlag)
+		var jsonResult map[string]interface{}
+		val, _ := json.Marshal(result.JSON())
+		err := json.Unmarshal(val, &jsonResult)
 		if err != nil {
 			return "", err
 		}
 
-		return fmt.Sprintf("%v", value), nil
+		return fmt.Sprintf("%v", jsonResult[filterFlag]), nil
 	}
 
 	switch formatFlag {
@@ -260,29 +260,6 @@ func outputResult(result string, saveFlag string) error {
 	return nil
 }
 
-// filterResultValue returns a value by its name filtered from other result values
-func filterResultValue(result Result, filter string) (interface{}, error) {
-	var jsonResult map[string]interface{}
-	val, _ := json.Marshal(result.JSON())
-	err := json.Unmarshal(val, &jsonResult)
-	if err != nil {
-		return "", err
-	}
-
-	possibleFilters := make([]string, 0)
-	for key, _ := range jsonResult {
-		possibleFilters = append(possibleFilters, fmt.Sprintf("%s", key))
-	}
-
-	value := jsonResult[filter]
-
-	if value == nil {
-		return nil, fmt.Errorf("value for filter: '%s' doesn't exists, possible values to filter by: %s", filter, possibleFilters)
-	}
-
-	return value, nil
-}
-
 // handleError handle errors
 func handleError(description string, err error) {
 	if err == nil {
@@ -295,10 +272,7 @@ func handleError(description string, err error) {
 	case *client.RPCError:
 		fmt.Fprintf(os.Stderr, "❌ Grpc Error: %s \n", t.GRPCStatus().Err().Error())
 	default:
-		if errors.Is(err, config.ErrOutdatedFormat) {
-			fmt.Fprintf(os.Stderr, "❌ Config Error: %s \n", err.Error())
-			fmt.Fprintf(os.Stderr, "🙏 Please reset configuration using: 'flow init --reset'. Read more about new configuration here: https://github.com/onflow/flow-cli/releases/tag/v0.17.0")
-		} else if strings.Contains(err.Error(), "transport:") {
+		if strings.Contains(err.Error(), "transport:") {
 			fmt.Fprintf(os.Stderr, "❌ %s \n", strings.Split(err.Error(), "transport:")[1])
 			fmt.Fprintf(os.Stderr, "🙏 Make sure your emulator is running or connection address is correct.")
 		} else if strings.Contains(err.Error(), "NotFound desc =") {
diff --git a/internal/config/init.go b/internal/config/init.go
deleted file mode 100644
index 6f0f3c10..00000000
--- a/internal/config/init.go
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Flow CLI
- *
- * Copyright 2019-2021 Dapper Labs, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package config
-
-import (
-	"bytes"
-	"fmt"
-	"text/tabwriter"
-
-	"github.com/onflow/flow-cli/pkg/flowcli/project"
-	"github.com/onflow/flow-cli/pkg/flowcli/util"
-	"github.com/spf13/cobra"
-
-	"github.com/onflow/flow-cli/internal/command"
-	"github.com/onflow/flow-cli/pkg/flowcli/services"
-)
-
-type flagsInit struct {
-	ServicePrivateKey  string `flag:"service-private-key" info:"Service account private key"`
-	ServiceKeySigAlgo  string `default:"ECDSA_P256" flag:"service-sig-algo" info:"Service account key signature algorithm"`
-	ServiceKeyHashAlgo string `default:"SHA3_256" flag:"service-hash-algo" info:"Service account key hash algorithm"`
-	Reset              bool   `default:"false" flag:"reset" info:"Reset flow.json config file"`
-}
-
-var initFlag = flagsInit{}
-
-var InitCommand = &command.Command{
-	Cmd: &cobra.Command{
-		Use:   "init",
-		Short: "Initialize a new configuration",
-	},
-	Flags: &initFlag,
-	Run: func(
-		cmd *cobra.Command,
-		args []string,
-		globalFlags command.GlobalFlags,
-		services *services.Services,
-	) (command.Result, error) {
-		proj, err := services.Project.Init(
-			initFlag.Reset,
-			initFlag.ServiceKeySigAlgo,
-			initFlag.ServiceKeyHashAlgo,
-			initFlag.ServicePrivateKey,
-		)
-		if err != nil {
-			return nil, err
-		}
-
-		return &InitResult{proj}, nil
-	},
-}
-
-// InitResult result structure
-type InitResult struct {
-	*project.Project
-}
-
-// JSON convert result to JSON
-func (r *InitResult) JSON() interface{} {
-	return r
-}
-
-// String convert result to string
-func (r *InitResult) String() string {
-	var b bytes.Buffer
-	writer := tabwriter.NewWriter(&b, 0, 8, 1, '\t', tabwriter.AlignRight)
-	account, _ := r.Project.EmulatorServiceAccount()
-
-	fmt.Fprintf(writer, "Configuration initialized\n")
-	fmt.Fprintf(writer, "Service account: %s\n\n", util.Bold("0x"+account.Address().String()))
-	fmt.Fprintf(writer,
-		"Start emulator by running: %s \nReset configuration using: %s\n",
-		util.Bold("'flow emulator'"),
-		util.Bold("'flow init --reset'"),
-	)
-
-	writer.Flush()
-	return b.String()
-}
-
-// Oneliner show result as one liner grep friendly
-func (r *InitResult) Oneliner() string {
-	return ""
-}
diff --git a/internal/emulator/start.go b/internal/emulator/start.go
index f3b0ab5e..51141417 100644
--- a/internal/emulator/start.go
+++ b/internal/emulator/start.go
@@ -19,9 +19,7 @@
 package emulator
 
 import (
-	"errors"
-
-	emulator "github.com/onflow/flow-emulator"
+	"strings"
 
 	"github.com/onflow/flow-emulator/cmd/emulator/start"
 	"github.com/onflow/flow-go-sdk/crypto"
@@ -39,43 +37,20 @@ var Cmd = &cobra.Command{
 }
 
 func configuredServiceKey(
-	init bool,
-	sigAlgo crypto.SignatureAlgorithm,
-	hashAlgo crypto.HashAlgorithm,
+	_ bool,
+	_ crypto.SignatureAlgorithm,
+	_ crypto.HashAlgorithm,
 ) (
 	crypto.PrivateKey,
 	crypto.SignatureAlgorithm,
 	crypto.HashAlgorithm,
 ) {
-	var proj *project.Project
-	var err error
-
-	if init {
-		if sigAlgo == crypto.UnknownSignatureAlgorithm {
-			sigAlgo = emulator.DefaultServiceKeySigAlgo
-		}
-
-		if hashAlgo == crypto.UnknownHashAlgorithm {
-			hashAlgo = emulator.DefaultServiceKeyHashAlgo
-		}
-
-		proj, err = project.Init(sigAlgo, hashAlgo)
-		if err != nil {
-			util.Exitf(1, err.Error())
+	proj, err := project.Load(util.ConfigPath)
+	if err != nil {
+		if strings.Contains(err.Error(), "project config file does not exist") {
+			util.Exitf(1, "🙏 Configuration is missing, initialize it with: 'flow project init' and then rerun this command.")
 		} else {
-			err = proj.Save(project.DefaultConfigPath)
-			if err != nil {
-				util.Exitf(1, err.Error())
-			}
-		}
-	} else {
-		proj, err = project.Load(project.DefaultConfigPaths)
-		if err != nil {
-			if errors.Is(err, config.ErrDoesNotExist) {
-				util.Exitf(1, "🙏 Configuration is missing, initialize it with: 'flow project init' and then rerun this command.")
-			} else {
-				util.Exitf(1, err.Error())
-			}
+			util.Exitf(1, err.Error())
 		}
 	}
 
@@ -101,4 +76,5 @@ func configuredServiceKey(
 func init() {
 	Cmd = start.Cmd(configuredServiceKey)
 	Cmd.Use = "emulator"
+	Cmd.Flags().MarkDeprecated("init", "init is no longer supported use `flow project init` first")
 }
diff --git a/internal/events/events.go b/internal/events/events.go
index 18eaefbb..1285dd09 100644
--- a/internal/events/events.go
+++ b/internal/events/events.go
@@ -54,10 +54,10 @@ func (k *EventResult) JSON() interface{} {
 	for _, blockEvent := range k.BlockEvents {
 		if len(blockEvent.Events) > 0 {
 			for _, event := range blockEvent.Events {
-				result["blockID"][blockEvent.Height]["index"] = event.EventIndex
-				result["blockID"][blockEvent.Height]["type"] = event.Type
-				result["blockID"][blockEvent.Height]["txID"] = event.TransactionID
-				result["blockID"][blockEvent.Height]["values"] = event.Value
+				result["BlockID"][blockEvent.Height]["Index"] = event.EventIndex
+				result["BlockID"][blockEvent.Height]["Type"] = event.Type
+				result["BlockID"][blockEvent.Height]["TxID"] = event.TransactionID
+				result["BlockID"][blockEvent.Height]["Values"] = event.Value
 			}
 		}
 	}
diff --git a/internal/events/get.go b/internal/events/get.go
index 90dac40a..8d111418 100644
--- a/internal/events/get.go
+++ b/internal/events/get.go
@@ -28,7 +28,7 @@ import (
 )
 
 type flagsGenerate struct {
-	Verbose bool `flag:"verbose" info:"⚠️  Deprecated"`
+	Verbose bool `flag:"verbose" info:"⚠️  No longer supported"`
 }
 
 var generateFlag = flagsGenerate{}
@@ -48,7 +48,7 @@ var GetCommand = &command.Command{
 		services *services.Services,
 	) (command.Result, error) {
 		if generateFlag.Verbose {
-			fmt.Println("⚠️  DEPRECATION WARNING: verbose flag is deprecated")
+			return nil, fmt.Errorf("⚠️  No longer supported.")
 		}
 
 		end := ""
diff --git a/internal/keys/decode.go b/internal/keys/decode.go
index c9c3c9b4..b651b8f0 100644
--- a/internal/keys/decode.go
+++ b/internal/keys/decode.go
@@ -1,3 +1,21 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package keys
 
 import (
diff --git a/internal/keys/generate.go b/internal/keys/generate.go
index ebb513aa..cc38d07a 100644
--- a/internal/keys/generate.go
+++ b/internal/keys/generate.go
@@ -30,7 +30,7 @@ import (
 type flagsGenerate struct {
 	Seed       string `flag:"seed" info:"Deterministic seed phrase"`
 	KeySigAlgo string `default:"ECDSA_P256" flag:"sig-algo" info:"Signature algorithm"`
-	Algo       string `default:"" flag:"algo" info:"⚠️  Deprecated: use sig-algo argument"`
+	Algo       string `default:"" flag:"algo" info:"⚠️  No longer supported: use sig-algo argument"`
 }
 
 var generateFlags = flagsGenerate{}
@@ -49,8 +49,7 @@ var GenerateCommand = &command.Command{
 		services *services.Services,
 	) (command.Result, error) {
 		if generateFlags.Algo != "" {
-			fmt.Println("⚠️ DEPRECATION WARNING: flag no longer supported, use '--sig-algo' instead.")
-			generateFlags.KeySigAlgo = generateFlags.Algo
+			return nil, fmt.Errorf("⚠️ Algo flag no longer supported: use '--sig-algo' flag.")
 		}
 
 		privateKey, err := services.Keys.Generate(generateFlags.Seed, generateFlags.KeySigAlgo)
diff --git a/internal/keys/keys.go b/internal/keys/keys.go
index 7d94662c..b8030d31 100644
--- a/internal/keys/keys.go
+++ b/internal/keys/keys.go
@@ -49,8 +49,8 @@ type KeyResult struct {
 // JSON convert result to JSON
 func (k *KeyResult) JSON() interface{} {
 	result := make(map[string]string)
-	result["private"] = hex.EncodeToString(k.privateKey.PublicKey().Encode())
-	result["public"] = hex.EncodeToString(k.privateKey.Encode())
+	result["Private"] = hex.EncodeToString(k.privateKey.PublicKey().Encode())
+	result["Public"] = hex.EncodeToString(k.privateKey.Encode())
 
 	return result
 }
@@ -82,3 +82,7 @@ func (k *KeyResult) String() string {
 func (k *KeyResult) Oneliner() string {
 	return fmt.Sprintf("Private Key: %x, Public Key: %x", k.privateKey.Encode(), k.publicKey.Encode())
 }
+
+func (k *KeyResult) ToConfig() string {
+	return ""
+}
diff --git a/internal/project/init.go b/internal/project/init.go
index e52e4492..d4d16b6f 100644
--- a/internal/project/init.go
+++ b/internal/project/init.go
@@ -1,22 +1,49 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package project
 
 import (
+	"bytes"
 	"fmt"
+	"text/tabwriter"
 
 	"github.com/spf13/cobra"
 
 	"github.com/onflow/flow-cli/internal/command"
+	"github.com/onflow/flow-cli/pkg/flowcli/project"
 	"github.com/onflow/flow-cli/pkg/flowcli/services"
+	"github.com/onflow/flow-cli/pkg/flowcli/util"
 )
 
-type flagsInit struct{}
+type flagsInit struct {
+	ServicePrivateKey  string `flag:"service-private-key" info:"Service account private key"`
+	ServiceKeySigAlgo  string `default:"ECDSA_P256" flag:"service-sig-algo" info:"Service account key signature algorithm"`
+	ServiceKeyHashAlgo string `default:"SHA3_256" flag:"service-hash-algo" info:"Service account key hash algorithm"`
+	Reset              bool   `default:"false" flag:"reset" info:"Reset flow.json config file"`
+}
 
 var initFlag = flagsInit{}
 
 var InitCommand = &command.Command{
 	Cmd: &cobra.Command{
 		Use:   "init",
-		Short: "⚠️  No longer supported: use 'flow init' command",
+		Short: "Initialize a new account profile",
 	},
 	Flags: &initFlag,
 	Run: func(
@@ -25,7 +52,17 @@ var InitCommand = &command.Command{
 		globalFlags command.GlobalFlags,
 		services *services.Services,
 	) (command.Result, error) {
-		return nil, fmt.Errorf("⚠️  No longer supported: use 'flow init' command.")
+		proj, err := services.Project.Init(
+			initFlag.Reset,
+			initFlag.ServiceKeySigAlgo,
+			initFlag.ServiceKeyHashAlgo,
+			initFlag.ServicePrivateKey,
+		)
+		if err != nil {
+			return nil, err
+		}
+
+		return &InitResult{proj}, nil
 	},
 }
 
@@ -36,12 +73,7 @@ type InitResult struct {
 
 // JSON convert result to JSON
 func (r *InitResult) JSON() interface{} {
-	account, _ := r.Project.EmulatorServiceAccount()
-	result := make(map[string]string)
-
-	result["serviceAccount"] = account.Address().Hex()
-
-	return result
+	return r
 }
 
 // String convert result to string
diff --git a/internal/project/project.go b/internal/project/project.go
index f74a9d0c..f3a6fb24 100644
--- a/internal/project/project.go
+++ b/internal/project/project.go
@@ -19,6 +19,11 @@
 package project
 
 import (
+	"bytes"
+	"fmt"
+	"text/tabwriter"
+
+	"github.com/onflow/flow-go-sdk"
 	"github.com/spf13/cobra"
 )
 
@@ -32,3 +37,28 @@ func init() {
 	DeployCommand.AddToParent(Cmd)
 	InitCommand.AddToParent(Cmd)
 }
+
+// ProjectResult structure
+type ProjectResult struct {
+	*flow.Collection
+}
+
+// JSON convert result to JSON
+func (c *ProjectResult) JSON() interface{} {
+	return c
+}
+
+// String convert result to string
+func (c *ProjectResult) String() string {
+	var b bytes.Buffer
+	writer := tabwriter.NewWriter(&b, 0, 8, 1, '\t', tabwriter.AlignRight)
+	fmt.Fprintf(writer, "%s\n", c.Collection)
+	writer.Flush()
+
+	return b.String()
+}
+
+// Oneliner show result as one liner grep friendly
+func (c *ProjectResult) Oneliner() string {
+	return fmt.Sprintf("%s", c.Collection)
+}
diff --git a/internal/scripts/execute.go b/internal/scripts/execute.go
index ecb97fb3..21bc0a42 100644
--- a/internal/scripts/execute.go
+++ b/internal/scripts/execute.go
@@ -30,8 +30,8 @@ import (
 type flagsScripts struct {
 	ArgsJSON string   `default:"" flag:"args-json" info:"arguments in JSON-Cadence format"`
 	Arg      []string `default:"" flag:"arg" info:"argument in Type:Value format"`
-	Code     string   `default:"" flag:"code" info:"⚠️  Deprecated: use filename argument"`
-	Args     string   `default:"" flag:"args" info:"⚠️  Deprecated: use arg or args-json flag"`
+	Code     bool     `default:"false" flag:"code" info:"⚠️  No longer supported: use filename argument"`
+	Args     string   `default:"false" flag:"args" info:"⚠️  No longer supported: use arg or args-json flag"`
 }
 
 var scriptFlags = flagsScripts{}
@@ -41,7 +41,7 @@ var ExecuteCommand = &command.Command{
 		Use:     "execute <filename>",
 		Short:   "Execute a script",
 		Example: `flow scripts execute script.cdc --arg String:"Meow" --arg String:"Woof"`,
-		Args:    cobra.MaximumNArgs(1),
+		Args:    cobra.ExactArgs(1),
 	},
 	Flags: &scriptFlags,
 	Run: func(
@@ -50,26 +50,15 @@ var ExecuteCommand = &command.Command{
 		globalFlags command.GlobalFlags,
 		services *services.Services,
 	) (command.Result, error) {
-		filename := ""
-		if len(args) == 1 {
-			filename = args[0]
-		} else if scriptFlags.Code != "" {
-			fmt.Println("⚠️  DEPRECATION WARNING: use filename as a command argument <filename>")
-			filename = scriptFlags.Code
-		} else {
-			return nil, fmt.Errorf("provide a valide filename command argument")
+		if scriptFlags.Code {
+			return nil, fmt.Errorf("⚠️  No longer supported: use filename argument")
 		}
-
 		if scriptFlags.Args != "" {
-			fmt.Println("⚠️  DEPRECATION WARNING: use arg flag in Type:Value format or args-json for JSON format")
-
-			if len(scriptFlags.Arg) == 0 && scriptFlags.ArgsJSON == "" {
-				scriptFlags.ArgsJSON = scriptFlags.Args // backward compatible, args was in json format
-			}
+			return nil, fmt.Errorf("⚠️  No longer supported: use arg flag in Type:Value format or arg-json for JSON format")
 		}
 
 		value, err := services.Scripts.Execute(
-			filename,
+			args[0], // filename
 			scriptFlags.Arg,
 			scriptFlags.ArgsJSON,
 		)
diff --git a/internal/scripts/scripts.go b/internal/scripts/scripts.go
index a9190d41..44160ea9 100644
--- a/internal/scripts/scripts.go
+++ b/internal/scripts/scripts.go
@@ -43,9 +43,7 @@ type ScriptResult struct {
 
 // JSON convert result to JSON
 func (r *ScriptResult) JSON() interface{} {
-	result := make(map[string]interface{})
-	result["result"] = r.Value
-	return result
+	return r
 }
 
 // String convert result to string
diff --git a/internal/transactions/get.go b/internal/transactions/get.go
index db302956..682d8138 100644
--- a/internal/transactions/get.go
+++ b/internal/transactions/get.go
@@ -25,20 +25,20 @@ import (
 	"github.com/onflow/flow-cli/pkg/flowcli/services"
 )
 
-type flagsGet struct {
+type flagsStatus struct {
 	Sealed bool `default:"true" flag:"sealed" info:"Wait for a sealed result"`
 	Code   bool `default:"false" flag:"code" info:"Display transaction code"`
 }
 
-var getFlags = flagsGet{}
+var statusFlags = flagsStatus{}
 
 var GetCommand = &command.Command{
 	Cmd: &cobra.Command{
 		Use:   "get <tx_id>",
-		Short: "Get the transaction by ID",
+		Short: "Get the transaction status",
 		Args:  cobra.ExactArgs(1),
 	},
-	Flags: &getFlags,
+	Flags: &statusFlags,
 	Run: func(
 		cmd *cobra.Command,
 		args []string,
@@ -47,7 +47,7 @@ var GetCommand = &command.Command{
 	) (command.Result, error) {
 		tx, result, err := services.Transactions.GetStatus(
 			args[0], // transaction id
-			getFlags.Sealed,
+			statusFlags.Sealed,
 		)
 		if err != nil {
 			return nil, err
@@ -56,7 +56,7 @@ var GetCommand = &command.Command{
 		return &TransactionResult{
 			result: result,
 			tx:     tx,
-			code:   getFlags.Code,
+			code:   statusFlags.Code,
 		}, nil
 	},
 }
diff --git a/internal/transactions/send.go b/internal/transactions/send.go
index 5afe73ad..82806498 100644
--- a/internal/transactions/send.go
+++ b/internal/transactions/send.go
@@ -31,9 +31,9 @@ type flagsSend struct {
 	ArgsJSON string   `default:"" flag:"args-json" info:"arguments in JSON-Cadence format"`
 	Arg      []string `default:"" flag:"arg" info:"argument in Type:Value format"`
 	Signer   string   `default:"emulator-account" flag:"signer"`
-	Code     string   `default:"" flag:"code" info:"⚠️  Deprecated: use filename argument"`
-	Results  bool     `default:"" flag:"results" info:"⚠️  Deprecated: all transactions will provide result"`
-	Args     string   `default:"false" flag:"args" info:"⚠️  Deprecated: use arg or args-json flag"`
+	Code     string   `default:"" flag:"code" info:"⚠️  No longer supported: use filename argument"`
+	Results  bool     `default:"" flag:"results" info:"⚠️  No longer supported: all transactions will provide result"`
+	Args     string   `default:"false" flag:"args" info:"⚠️  No longer supported: use arg or args-json flag"`
 }
 
 var sendFlags = flagsSend{}
@@ -42,7 +42,7 @@ var SendCommand = &command.Command{
 	Cmd: &cobra.Command{
 		Use:     "send <filename>",
 		Short:   "Send a transaction",
-		Args:    cobra.MaximumNArgs(1),
+		Args:    cobra.ExactArgs(1),
 		Example: `flow transactions send tx.cdc --arg String:"Hello world"`,
 	},
 	Flags: &sendFlags,
@@ -52,30 +52,18 @@ var SendCommand = &command.Command{
 		globalFlags command.GlobalFlags,
 		services *services.Services,
 	) (command.Result, error) {
+		if sendFlags.Code != "" {
+			return nil, fmt.Errorf("⚠️  No longer supported: use filename argument")
+		}
 		if sendFlags.Results {
-			fmt.Println("⚠️  DEPRECATION WARNING: all transactions will provide results")
+			return nil, fmt.Errorf("⚠️  No longer supported: all transactions will provide results")
 		}
-
 		if sendFlags.Args != "" {
-			fmt.Println("⚠️  DEPRECATION WARNING: use arg flag in Type:Value format or arg-json for JSON format")
-
-			if len(sendFlags.Arg) == 0 && sendFlags.ArgsJSON == "" {
-				sendFlags.ArgsJSON = sendFlags.Args // backward compatible, args was in json format
-			}
-		}
-
-		filename := ""
-		if len(args) == 1 {
-			filename = args[0]
-		} else if sendFlags.Code != "" {
-			fmt.Println("⚠️  DEPRECATION WARNING: use filename as a command argument <filename>")
-			filename = sendFlags.Code
-		} else {
-			return nil, fmt.Errorf("provide a valide filename command argument")
+			return nil, fmt.Errorf("⚠️  No longer supported: use arg flag in Type:Value format or arg-json for JSON format")
 		}
 
 		tx, result, err := services.Transactions.Send(
-			filename,
+			args[0], // filename
 			sendFlags.Signer,
 			sendFlags.Arg,
 			sendFlags.ArgsJSON,
diff --git a/internal/transactions/status.go b/internal/transactions/status.go
deleted file mode 100644
index edba6aa5..00000000
--- a/internal/transactions/status.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package transactions
-
-import (
-	"fmt"
-
-	"github.com/spf13/cobra"
-
-	"github.com/onflow/flow-cli/internal/command"
-	"github.com/onflow/flow-cli/pkg/flowcli/services"
-)
-
-type flagsStatus struct{}
-
-var statusFlags = flagsStatus{}
-
-var StatusCommand = &command.Command{
-	Cmd: &cobra.Command{
-		Use:   "status",
-		Short: "⚠️  No longer supported: use 'transactions get' command",
-	},
-	Flags: &statusFlags,
-	Run: func(
-		cmd *cobra.Command,
-		args []string,
-		globalFlags command.GlobalFlags,
-		services *services.Services,
-	) (command.Result, error) {
-		return nil, fmt.Errorf("⚠️  No longer supported: use 'transactions get' command.")
-	},
-}
diff --git a/internal/transactions/transactions.go b/internal/transactions/transactions.go
index cf1abe59..e26845f1 100644
--- a/internal/transactions/transactions.go
+++ b/internal/transactions/transactions.go
@@ -38,7 +38,6 @@ var Cmd = &cobra.Command{
 func init() {
 	GetCommand.AddToParent(Cmd)
 	SendCommand.AddToParent(Cmd)
-	StatusCommand.AddToParent(Cmd)
 }
 
 // TransactionResult represent result from all account commands
@@ -51,11 +50,11 @@ type TransactionResult struct {
 // JSON convert result to JSON
 func (r *TransactionResult) JSON() interface{} {
 	result := make(map[string]string)
-	result["hash"] = r.tx.ID().String()
-	result["status"] = r.result.Status.String()
+	result["Hash"] = r.tx.ID().String()
+	result["Status"] = r.result.Status.String()
 
 	if r.result != nil {
-		result["events"] = fmt.Sprintf("%s", r.result.Events)
+		result["Events"] = fmt.Sprintf("%s", r.result.Events)
 	}
 
 	return result
diff --git a/pkg/flowcli/README.md b/pkg/flowcli/Readme.md
similarity index 99%
rename from pkg/flowcli/README.md
rename to pkg/flowcli/Readme.md
index e867f882..1ae21b30 100644
--- a/pkg/flowcli/README.md
+++ b/pkg/flowcli/Readme.md
@@ -4,12 +4,10 @@ Flow CLI package contains all the functionality used in CLI.
 This package is meant to be used by third party (langauge server etc...).
 
 ### Config
-
 Config package implements parsing and serializing configuration
 and persisting state needed for some commands.
 
 ### Gateway
-
 Gateway package contains functions that interact with the Flow blockchain. 
 This package offers abstraction over communicating with the Flow network and 
 takes care of initializing the network client and handling errors. 
diff --git a/pkg/flowcli/arguments.go b/pkg/flowcli/arguments.go
index b175a72c..b40ff875 100644
--- a/pkg/flowcli/arguments.go
+++ b/pkg/flowcli/arguments.go
@@ -69,10 +69,7 @@ func ParseArgumentsCommaSplit(input []string) ([]cadence.Value, error) {
 	for _, in := range input {
 		argInput := strings.Split(in, ":")
 		if len(argInput) != 2 {
-			return nil, fmt.Errorf(
-				"argument not passed in correct format, correct format is: Type:Value, got %s",
-				in,
-			)
+			return nil, fmt.Errorf("Argument not passed in correct format, correct format is: Type:Value, got %s", in)
 		}
 
 		args = append(args, map[string]string{
@@ -95,6 +92,5 @@ func ParseArguments(args []string, argsJSON string) (scriptArgs []cadence.Value,
 	if err != nil {
 		return nil, err
 	}
-
 	return
 }
diff --git a/pkg/flowcli/config/config.go b/pkg/flowcli/config/config.go
index d6c914c9..a13ae4eb 100644
--- a/pkg/flowcli/config/config.go
+++ b/pkg/flowcli/config/config.go
@@ -19,8 +19,6 @@
 package config
 
 import (
-	"errors"
-
 	"github.com/onflow/flow-go-sdk"
 	"github.com/onflow/flow-go-sdk/crypto"
 )
@@ -39,21 +37,21 @@ type Accounts []Account
 type Deployments []Deploy
 type Emulators []Emulator
 
-// Network defines the configuration for a Flow network.
+// Network config sets host and chain id
 type Network struct {
 	Name    string
 	Host    string
 	ChainID flow.ChainID
 }
 
-// Deploy defines the configuration for a contract deployment.
+// Deploy structure for contract
 type Deploy struct {
 	Network   string   // network name to deploy to
 	Account   string   // account name to which to deploy to
 	Contracts []string // contracts names to deploy
 }
 
-// Contract defines the configuration for a Cadence contract.
+// Contract is config for contract
 type Contract struct {
 	Name    string
 	Source  string
@@ -61,7 +59,7 @@ type Contract struct {
 	Alias   string
 }
 
-// Account defines the configuration for a Flow account.
+// Account is main config for each account
 type Account struct {
 	Name    string
 	Address flow.Address
@@ -69,7 +67,7 @@ type Account struct {
 	Keys    []AccountKey
 }
 
-// AccountKey defines the configuration for a Flow account key.
+// AccountKey is config for account key
 type AccountKey struct {
 	Type     KeyType
 	Index    int
@@ -78,7 +76,7 @@ type AccountKey struct {
 	Context  map[string]string
 }
 
-// Emulator defines the configuration for a Flow Emulator instance.
+// Emulator is config for emulator
 type Emulator struct {
 	Name           string
 	Port           int
@@ -96,7 +94,19 @@ const (
 	KMSContextField                   = "resourceName"
 )
 
-var ErrOutdatedFormat = errors.New("you are using old configuration format")
+//TODO: replace filter with find where only one is expected
+// GetForNetwork get all contracts by network
+func (c *Contracts) GetForNetwork(network string) Contracts {
+	contracts := make(Contracts, 0)
+
+	for _, contract := range *c {
+		if contract.Network == network {
+			contracts = append(contracts, contract)
+		}
+	}
+
+	return contracts
+}
 
 // IsAlias checks if contract has an alias
 func (c *Contract) IsAlias() bool {
@@ -177,6 +187,17 @@ func (a *Accounts) GetByName(name string) *Account {
 	return nil
 }
 
+// GetByAddress get account by address
+func (a *Accounts) GetByAddress(address string) *Account {
+	for _, account := range *a {
+		if account.Address.String() == address {
+			return &account
+		}
+	}
+
+	return nil
+}
+
 // AddOrUpdate add new or update if already present
 func (a *Accounts) AddOrUpdate(name string, account Account) {
 	for i, existingAccount := range *a {
diff --git a/pkg/flowcli/config/json/config.go b/pkg/flowcli/config/json/config.go
index ad615e13..cb36f093 100644
--- a/pkg/flowcli/config/json/config.go
+++ b/pkg/flowcli/config/json/config.go
@@ -52,26 +52,6 @@ func transformConfigToJSON(config *config.Config) jsonConfig {
 	}
 }
 
-type oldFormat struct {
-	Host     interface{} `json:"host"`
-	Accounts interface{} `json:"accounts"`
-}
-
-func oldConfigFormat(raw []byte) bool {
-	var conf oldFormat
-
-	err := json.Unmarshal(raw, &conf)
-	if err != nil { // ignore errors in this case
-		return false
-	}
-
-	if conf.Host != nil {
-		return true
-	}
-
-	return false
-}
-
 // Parsers for configuration
 type Parser struct{}
 
@@ -94,11 +74,6 @@ func (p *Parser) Serialize(conf *config.Config) ([]byte, error) {
 
 // Deserialize configuration to config structure
 func (p *Parser) Deserialize(raw []byte) (*config.Config, error) {
-	// check if old format of config and return an error
-	if oldConfigFormat(raw) {
-		return nil, config.ErrOutdatedFormat
-	}
-
 	var jsonConf jsonConfig
 	err := json.Unmarshal(raw, &jsonConf)
 
diff --git a/pkg/flowcli/config/loader.go b/pkg/flowcli/config/loader.go
index 8ced3d89..9911dc7d 100644
--- a/pkg/flowcli/config/loader.go
+++ b/pkg/flowcli/config/loader.go
@@ -46,7 +46,7 @@ type Parser interface {
 	SupportsFormat(string) bool
 }
 
-// ConfigParsers is a list of all configuration parsers.
+// ConfigParsers lsit of all configuration parsers
 type ConfigParsers []Parser
 
 // FindForFormat finds a parser that can parse a specific format based on extension
@@ -60,14 +60,14 @@ func (c *ConfigParsers) FindForFormat(extension string) Parser {
 	return nil
 }
 
-// Loader contains actions for composing and modifying configuration.
+// Loader contains actions for composing and modification of configuration
 type Loader struct {
 	af               *afero.Afero
 	configParsers    ConfigParsers
 	composedFromFile map[string]string
 }
 
-// NewLoader returns a new loader.
+// NewLoader creates a new loader
 func NewLoader(filesystem afero.Fs) *Loader {
 	af := &afero.Afero{Fs: filesystem}
 	return &Loader{
@@ -76,12 +76,12 @@ func NewLoader(filesystem afero.Fs) *Loader {
 	}
 }
 
-// AddConfigParser adds a new configuration parser.
+// AddConfigParser adds new parssers for configuration
 func (l *Loader) AddConfigParser(format Parser) {
 	l.configParsers = append(l.configParsers, format)
 }
 
-// Save saves a configuration to a path with correct serializer
+// Save save configuration to a path with correct serializer
 func (l *Loader) Save(conf *Config, path string) error {
 	configFormat := l.configParsers.FindForFormat(
 		filepath.Ext(path),
@@ -100,10 +100,7 @@ func (l *Loader) Save(conf *Config, path string) error {
 	return nil
 }
 
-// Load loads configuration from one or more file paths.
-//
-// If more than one path is specified, their contents are merged
-// together into on configuration object.
+// Load and compose multiple configurations
 func (l *Loader) Load(paths []string) (*Config, error) {
 	var baseConf *Config
 
diff --git a/pkg/flowcli/gateway/grpc.go b/pkg/flowcli/gateway/grpc.go
index 4fae9ac4..a64ed5c0 100644
--- a/pkg/flowcli/gateway/grpc.go
+++ b/pkg/flowcli/gateway/grpc.go
@@ -31,13 +31,13 @@ import (
 	"github.com/onflow/flow-cli/pkg/flowcli/project"
 )
 
-// GrpcGateway is a gateway implementation that uses the Flow Access gRPC API.
+// GrpcGateway contains all functions that need flow client to execute
 type GrpcGateway struct {
 	client *client.Client
 	ctx    context.Context
 }
 
-// NewGrpcGateway returns a new gRPC gateway.
+// NewGrpcGateway creates new grpc gateway
 func NewGrpcGateway(host string) (*GrpcGateway, error) {
 	gClient, err := client.New(host, grpc.WithInsecure())
 	ctx := context.Background()
@@ -52,22 +52,22 @@ func NewGrpcGateway(host string) (*GrpcGateway, error) {
 	}, nil
 }
 
-// GetAccount gets an account by address from the Flow Access API.
+// GetAccount gets account by the address from flow
 func (g *GrpcGateway) GetAccount(address flow.Address) (*flow.Account, error) {
 	account, err := g.client.GetAccountAtLatestBlock(g.ctx, address)
 	if err != nil {
-		return nil, fmt.Errorf("failed to get account with address %s: %w", address, err)
+		return nil, fmt.Errorf("Failed to get account with address %s: %s", address, err)
 	}
 
 	return account, nil
 }
 
 // TODO: replace with txsender - much nicer implemented
-// SendTransaction sends a transaction to Flow through the Access API.
+// SendTransaction send a transaction to flow
 func (g *GrpcGateway) SendTransaction(tx *flow.Transaction, signer *project.Account) (*flow.Transaction, error) {
 	account, err := g.GetAccount(signer.Address())
 	if err != nil {
-		return nil, fmt.Errorf("failed to get account with address %s: %w", signer.Address(), err)
+		return nil, fmt.Errorf("Failed to get account with address %s: 0x%s", signer.Address(), err)
 	}
 
 	// Default 0, i.e. first key
@@ -75,7 +75,7 @@ func (g *GrpcGateway) SendTransaction(tx *flow.Transaction, signer *project.Acco
 
 	sealed, err := g.client.GetLatestBlockHeader(g.ctx, true)
 	if err != nil {
-		return nil, fmt.Errorf("failed to get latest sealed block: %w", err)
+		return nil, fmt.Errorf("Failed to get latest sealed block: %s", err)
 	}
 
 	tx.SetReferenceBlockID(sealed.ID).
@@ -89,23 +89,23 @@ func (g *GrpcGateway) SendTransaction(tx *flow.Transaction, signer *project.Acco
 
 	err = tx.SignEnvelope(signer.Address(), accountKey.Index, sig)
 	if err != nil {
-		return nil, fmt.Errorf("failed to sign transaction: %w", err)
+		return nil, fmt.Errorf("Failed to sign transaction: %s", err)
 	}
 
 	err = g.client.SendTransaction(g.ctx, *tx)
 	if err != nil {
-		return nil, fmt.Errorf("failed to submit transaction: %w", err)
+		return nil, fmt.Errorf("Failed to submit transaction: %s", err)
 	}
 
 	return tx, nil
 }
 
-// GetTransaction gets a transaction by ID from the Flow Access API.
+// GetTransaction gets transaction by id
 func (g *GrpcGateway) GetTransaction(id flow.Identifier) (*flow.Transaction, error) {
 	return g.client.GetTransaction(g.ctx, id)
 }
 
-// GetTransactionResult gets a transaction result by ID from the Flow Access API.
+// GetTransactionResult gets result of a transaction on flow
 func (g *GrpcGateway) GetTransactionResult(tx *flow.Transaction, waitSeal bool) (*flow.TransactionResult, error) {
 	result, err := g.client.GetTransactionResult(g.ctx, tx.ID())
 	if err != nil {
@@ -120,33 +120,33 @@ func (g *GrpcGateway) GetTransactionResult(tx *flow.Transaction, waitSeal bool)
 	return result, nil
 }
 
-// ExecuteScript execute a scripts on Flow through the Access API.
+// ExecuteScript execute scripts on flow
 func (g *GrpcGateway) ExecuteScript(script []byte, arguments []cadence.Value) (cadence.Value, error) {
 
 	value, err := g.client.ExecuteScriptAtLatestBlock(g.ctx, script, arguments)
 	if err != nil {
-		return nil, fmt.Errorf("failed to submit executable script: %w", err)
+		return nil, fmt.Errorf("Failed to submit executable script %s", err)
 	}
 
 	return value, nil
 }
 
-// GetLatestBlock gets the latest block on Flow through the Access API.
+// GetLatestBlock gets latest block from flow
 func (g *GrpcGateway) GetLatestBlock() (*flow.Block, error) {
 	return g.client.GetLatestBlock(g.ctx, true)
 }
 
-// GetBlockByID get block by ID from the Flow Access API.
+// GetBlockByID get block by id from flow
 func (g *GrpcGateway) GetBlockByID(id flow.Identifier) (*flow.Block, error) {
 	return g.client.GetBlockByID(g.ctx, id)
 }
 
-// GetBlockByHeight get block by height from the Flow Access API.
+// GetBlockByHeight get block by id from flow
 func (g *GrpcGateway) GetBlockByHeight(height uint64) (*flow.Block, error) {
 	return g.client.GetBlockByHeight(g.ctx, height)
 }
 
-// GetEvents gets events by name and block range from the Flow Access API.
+// GetEvents gets event from start and end height
 func (g *GrpcGateway) GetEvents(
 	eventType string,
 	startHeight uint64,
@@ -165,7 +165,7 @@ func (g *GrpcGateway) GetEvents(
 	return events, err
 }
 
-// GetCollection gets a collection by ID from the Flow Access API.
+// GetCollection get collection by id from flow
 func (g *GrpcGateway) GetCollection(id flow.Identifier) (*flow.Collection, error) {
 	return g.client.GetCollection(g.ctx, id)
 }
diff --git a/pkg/flowcli/output/logger.go b/pkg/flowcli/output/logger.go
index 5af4c1c3..c8a6f790 100644
--- a/pkg/flowcli/output/logger.go
+++ b/pkg/flowcli/output/logger.go
@@ -31,6 +31,7 @@ const (
 	InfoLog  = 3
 )
 
+// Logger interface
 type Logger interface {
 	Debug(string)
 	Info(string)
@@ -39,14 +40,14 @@ type Logger interface {
 	StopProgress(string)
 }
 
-// NewStdoutLogger returns a new stdout logger.
+// NewStdoutLogger create new logger
 func NewStdoutLogger(level int) *StdoutLogger {
 	return &StdoutLogger{
 		level: level,
 	}
 }
 
-// StdoutLogger is a stdout logging implementation.
+// StdoutLogger stdout logging implementation
 type StdoutLogger struct {
 	level   int
 	spinner *Spinner
@@ -60,14 +61,17 @@ func (s *StdoutLogger) log(msg string, level int) {
 	fmt.Printf("%s\n", msg)
 }
 
+// Info log
 func (s *StdoutLogger) Info(msg string) {
 	s.log(msg, InfoLog)
 }
 
+// Debug log
 func (s *StdoutLogger) Debug(msg string) {
 	s.log(msg, DebugLog)
 }
 
+// Error log
 func (s *StdoutLogger) Error(msg string) {
 	s.log(fmt.Sprintf("❌  %s", util.Red(msg)), ErrorLog)
 }
diff --git a/pkg/flowcli/project/account.go b/pkg/flowcli/project/account.go
index 19cc3746..5d7f745e 100644
--- a/pkg/flowcli/project/account.go
+++ b/pkg/flowcli/project/account.go
@@ -1,3 +1,21 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package project
 
 import (
@@ -25,10 +43,6 @@ func (a *Account) Name() string {
 	return a.name
 }
 
-func (a *Account) Keys() []AccountKey {
-	return a.keys
-}
-
 func (a *Account) DefaultKey() AccountKey {
 	return a.keys[0]
 }
diff --git a/pkg/flowcli/project/project.go b/pkg/flowcli/project/project.go
index 711fcfbf..c367069e 100644
--- a/pkg/flowcli/project/project.go
+++ b/pkg/flowcli/project/project.go
@@ -33,26 +33,23 @@ import (
 	"github.com/onflow/flow-cli/pkg/flowcli/util"
 )
 
-var (
-	DefaultConfigPaths = []string{"flow.json"}
-	DefaultConfigPath  = DefaultConfigPaths[0]
-)
+var DefaultConfigPath = "flow.json"
 
-// Project contains the configuration for a Flow project.
+// Project has all the functionality to manage project
 type Project struct {
 	composer *config.Loader
 	conf     *config.Config
 	accounts []*Account
 }
 
-// Contract is a Cadence contract definition for a project.
+// Contract has all the functionality to manage contracts
 type Contract struct {
 	Name   string
 	Source string
 	Target flow.Address
 }
 
-// Load loads a project configuration and returns the resulting project.
+// Load loads configuration and setup the project
 func Load(configFilePath []string) (*Project, error) {
 	composer := config.NewLoader(afero.NewOsFs())
 
@@ -65,7 +62,7 @@ func Load(configFilePath []string) (*Project, error) {
 			return nil, err
 		}
 
-		return nil, err
+		return nil, fmt.Errorf("failed to open project configuration: %s", configFilePath)
 	}
 
 	proj, err := newProject(conf, composer)
@@ -76,7 +73,7 @@ func Load(configFilePath []string) (*Project, error) {
 	return proj, nil
 }
 
-// Save saves the project configuration to the given path.
+// Save saves project to path configuration
 func (p *Project) Save(path string) error {
 	p.conf.Accounts = accountsToConfig(p.accounts)
 	err := p.composer.Save(p.conf, path)
@@ -88,17 +85,14 @@ func (p *Project) Save(path string) error {
 	return nil
 }
 
-// Exists checks if a project configuration exists.
+// Exists checks if project exists
 func Exists(path string) bool {
 	return config.Exists(path)
 }
 
-// Init initializes a new Flow project.
+// Init initializes the project
 func Init(sigAlgo crypto.SignatureAlgorithm, hashAlgo crypto.HashAlgorithm) (*Project, error) {
 	emulatorServiceAccount, err := generateEmulatorServiceAccount(sigAlgo, hashAlgo)
-	if err != nil {
-		return nil, err
-	}
 
 	composer := config.NewLoader(afero.NewOsFs())
 	composer.AddConfigParser(json.NewParser())
@@ -107,7 +101,7 @@ func Init(sigAlgo crypto.SignatureAlgorithm, hashAlgo crypto.HashAlgorithm) (*Pr
 		composer: composer,
 		conf:     defaultConfig(emulatorServiceAccount),
 		accounts: []*Account{emulatorServiceAccount},
-	}, nil
+	}, err
 }
 
 const (
@@ -117,7 +111,7 @@ const (
 	DefaultEmulatorHost               = "127.0.0.1:3569"
 )
 
-// defaultConfig returns a new default configuration object.
+// defaultConfig creates new default configuration
 func defaultConfig(defaultEmulatorServiceAccount *Account) *config.Config {
 	return &config.Config{
 		Emulators: config.Emulators{{
@@ -133,7 +127,7 @@ func defaultConfig(defaultEmulatorServiceAccount *Account) *config.Config {
 	}
 }
 
-// newProject creates a new project from a configuration object.
+// newProject creates new project from configuration passed
 func newProject(conf *config.Config, composer *config.Loader) (*Project, error) {
 	accounts, err := accountsFromConfig(conf)
 	if err != nil {
@@ -147,11 +141,8 @@ func newProject(conf *config.Config, composer *config.Loader) (*Project, error)
 	}, nil
 }
 
-// CheckContractConflict returns true if the same contract is configured to deploy
-// to more than one account in the same network.
-//
-// The CLI currently does not allow the same contract to be deployed to multiple
-// accounts in the same network.
+// CheckContractConflict checks if there is any contract duplication between accounts
+// for now we don't allow two different accounts deploying same contract
 func (p *Project) ContractConflictExists(network string) bool {
 	contracts := p.ContractsByNetwork(network)
 
@@ -168,19 +159,19 @@ func (p *Project) ContractConflictExists(network string) bool {
 	return len(all) != len(uniq)
 }
 
-// NetworkByName returns a network by name.
+// NetworkByName returns a network by name
 func (p *Project) NetworkByName(name string) *config.Network {
 	return p.conf.Networks.GetByName(name)
 }
 
-// EmulatorServiceAccount returns the service account for the default emulator profilee.
+// EmulatorServiceAccount gets a service account for emulator
 func (p *Project) EmulatorServiceAccount() (*Account, error) {
 	emulator := p.conf.Emulators.Default()
 	acc := p.conf.Accounts.GetByName(emulator.ServiceAccount)
 	return AccountFromConfig(*acc)
 }
 
-// SetEmulatorServiceKey sets the default emulator service account private key.
+// SetEmulatorServiceKey sets emulator service key
 func (p *Project) SetEmulatorServiceKey(privateKey crypto.PrivateKey) {
 	acc := p.AccountByName(DefaultEmulatorServiceAccountName)
 	acc.SetDefaultKey(
@@ -192,15 +183,15 @@ func (p *Project) SetEmulatorServiceKey(privateKey crypto.PrivateKey) {
 	)
 }
 
-// ContractsByNetwork returns all contracts for a network.
+// ContractsByNetwork return all contract for network
 func (p *Project) ContractsByNetwork(network string) []Contract {
 	contracts := make([]Contract, 0)
 
-	// get deployments for the specified network
+	// get deployments for specific network
 	for _, deploy := range p.conf.Deployments.GetByNetwork(network) {
 		account := p.AccountByName(deploy.Account)
 
-		// go through each contract in this deployment
+		// go through each contract for this deploy
 		for _, contractName := range deploy.Contracts {
 			c := p.conf.Contracts.GetByNameAndNetwork(contractName, network)
 
@@ -217,7 +208,7 @@ func (p *Project) ContractsByNetwork(network string) []Contract {
 	return contracts
 }
 
-// AllAccountName returns all configured account names.
+// AllAccountName gets all account names
 func (p *Project) AllAccountName() []string {
 	names := make([]string, 0)
 
@@ -230,7 +221,12 @@ func (p *Project) AllAccountName() []string {
 	return names
 }
 
-// AddOrUpdateAccount adds or updates an account.
+// AddAccount adds account
+func (p *Project) AddAccount(account *Account) {
+	p.accounts = append(p.accounts, account)
+}
+
+// AddOrUpdateAccount addds or updates account
 func (p *Project) AddOrUpdateAccount(account *Account) {
 	for i, existingAccount := range p.accounts {
 		if existingAccount.name == account.name {
@@ -242,7 +238,7 @@ func (p *Project) AddOrUpdateAccount(account *Account) {
 	p.accounts = append(p.accounts, account)
 }
 
-// AccountByAddress returns an account by address.
+// AccountByAddress adds new account by address
 func (p *Project) AccountByAddress(address string) *Account {
 	for _, account := range p.accounts {
 		if account.address.String() == flow.HexToAddress(address).String() {
@@ -253,7 +249,7 @@ func (p *Project) AccountByAddress(address string) *Account {
 	return nil
 }
 
-// AccountByName returns an account by name.
+// AccountByName returns account by name
 func (p *Project) AccountByName(name string) *Account {
 	var account *Account
 
@@ -266,7 +262,7 @@ func (p *Project) AccountByName(name string) *Account {
 	return account
 }
 
-// AliasesForNetwork returns all deployment aliases for a network.
+// AliasesForNetwork gets all deployment aliases for network
 func (p *Project) AliasesForNetwork(network string) map[string]string {
 	aliases := make(map[string]string)
 
diff --git a/pkg/flowcli/services/accounts.go b/pkg/flowcli/services/accounts.go
index ee30c2be..6de890c9 100644
--- a/pkg/flowcli/services/accounts.go
+++ b/pkg/flowcli/services/accounts.go
@@ -37,14 +37,14 @@ import (
 	"github.com/onflow/flow-cli/pkg/flowcli/util"
 )
 
-// Accounts is a service that handles all account-related interactions.
+// Accounts service handles all interactions for accounts
 type Accounts struct {
 	gateway gateway.Gateway
 	project *project.Project
 	logger  output.Logger
 }
 
-// NewAccounts returns a new accounts service.
+// NewAccounts create new account service
 func NewAccounts(
 	gateway gateway.Gateway,
 	project *project.Project,
@@ -57,7 +57,7 @@ func NewAccounts(
 	}
 }
 
-// Get returns an account by on address.
+// Get gets an account based on address
 func (a *Accounts) Get(address string) (*flow.Account, error) {
 	a.logger.StartProgress(fmt.Sprintf("Loading %s...", address))
 
@@ -80,7 +80,7 @@ func (a *Accounts) Add(
 	path []string,
 ) (*project.Account, error) {
 	if a.project == nil {
-		return nil, fmt.Errorf("missing configuration, initialize it: flow init")
+		return nil, fmt.Errorf("missing configuration, initialize it: flow project init")
 	}
 
 	existingAccount := a.project.AccountByName(name)
@@ -159,7 +159,7 @@ func (a *Accounts) Add(
 	return account, nil
 }
 
-// StakingInfo returns the staking information for an account.
+// StakingInfo gets staking info for the account
 func (a *Accounts) StakingInfo(accountAddress string) (*cadence.Value, *cadence.Value, error) {
 	a.logger.StartProgress(fmt.Sprintf("Fetching info for %s...", accountAddress))
 
@@ -169,9 +169,7 @@ func (a *Accounts) StakingInfo(accountAddress string) (*cadence.Value, *cadence.
 
 	chain, err := util.GetAddressNetwork(address)
 	if err != nil {
-		return nil, nil, fmt.Errorf(
-			"failed to determine network from address, check the address and network",
-		)
+		return nil, nil, fmt.Errorf("failed to determine network from address, check the address and network")
 	}
 
 	if chain == flow.Emulator {
@@ -198,11 +196,7 @@ func (a *Accounts) StakingInfo(accountAddress string) (*cadence.Value, *cadence.
 	return &stakingValue, &delegationValue, nil
 }
 
-// Create creates and returns a new account.
-//
-// The new account is created with the given public keys and contracts.
-//
-// The account creation transaction is signed by the specified signer.
+// Create creates an account with signer name, keys, algorithms, contracts and returns the new account
 func (a *Accounts) Create(
 	signerName string,
 	keys []string,
@@ -211,7 +205,7 @@ func (a *Accounts) Create(
 	contracts []string,
 ) (*flow.Account, error) {
 	if a.project == nil {
-		return nil, fmt.Errorf("missing configuration, initialize it: flow init")
+		return nil, fmt.Errorf("missing configuration, initialize it: flow project init")
 	}
 
 	signer := a.project.AccountByName(signerName)
@@ -219,7 +213,7 @@ func (a *Accounts) Create(
 		return nil, fmt.Errorf("signer account: [%s] doesn't exists in configuration", signerName)
 	}
 
-	a.logger.StartProgress("Creating account...")
+	a.logger.StartProgress("Creating Account...")
 
 	accountKeys := make([]*flow.AccountKey, len(keys))
 
@@ -234,11 +228,7 @@ func (a *Accounts) Create(
 			strings.ReplaceAll(publicKeyHex, "0x", ""),
 		)
 		if err != nil {
-			return nil, fmt.Errorf(
-				"could not decode public key for key: %s, with signature algorith: %s",
-				publicKeyHex,
-				sigAlgo,
-			)
+			return nil, fmt.Errorf("could not decode public key for key: %s, with signature algorith: %s", publicKeyHex, sigAlgo)
 		}
 
 		accountKeys[i] = &flow.AccountKey{
@@ -284,7 +274,6 @@ func (a *Accounts) Create(
 	if err != nil {
 		return nil, err
 	}
-
 	if result.Error != nil {
 		return nil, result.Error
 	}
@@ -301,7 +290,7 @@ func (a *Accounts) Create(
 	return a.gateway.GetAccount(*newAccountAddress)
 }
 
-// AddContract adds a new contract to an account and returns the updated account.
+// AddContract adds new contract to the account and returns the updated account
 func (a *Accounts) AddContract(
 	accountName string,
 	contractName string,
@@ -309,7 +298,7 @@ func (a *Accounts) AddContract(
 	updateExisting bool,
 ) (*flow.Account, error) {
 	if a.project == nil {
-		return nil, fmt.Errorf("missing configuration, initialize it: flow init")
+		return nil, fmt.Errorf("missing configuration, initialize it: flow project init")
 	}
 
 	account := a.project.AccountByName(accountName)
@@ -320,6 +309,22 @@ func (a *Accounts) AddContract(
 	return a.addContract(account, contractName, contractFilename, updateExisting)
 }
 
+// AddContractForAddress adds new contract to the address using private key specified
+func (a *Accounts) AddContractForAddress(
+	accountAddress string,
+	accountPrivateKey string,
+	contractName string,
+	contractFilename string,
+	updateExisting bool,
+) (*flow.Account, error) {
+	account, err := accountFromAddressAndKey(accountAddress, accountPrivateKey)
+	if err != nil {
+		return nil, err
+	}
+
+	return a.addContract(account, contractName, contractFilename, updateExisting)
+}
+
 func (a *Accounts) addContract(
 	account *project.Account,
 	contractName string,
@@ -327,11 +332,7 @@ func (a *Accounts) addContract(
 	updateExisting bool,
 ) (*flow.Account, error) {
 	a.logger.StartProgress(
-		fmt.Sprintf(
-			"Adding contract '%s' to account '%s'...",
-			contractName,
-			account.Address(),
-		),
+		fmt.Sprintf("Adding Contract '%s' to the account '%s'...", contractName, account.Address()),
 	)
 
 	if account.DefaultKey().Type() == config.KeyTypeGoogleKMS {
@@ -380,7 +381,7 @@ func (a *Accounts) addContract(
 	}
 
 	if trx.Error != nil {
-		a.logger.Error("Failed to deploy contract")
+		a.logger.Error("Deploying contract failed")
 		return nil, trx.Error
 	}
 
@@ -389,23 +390,15 @@ func (a *Accounts) addContract(
 	a.logger.StopProgress("")
 
 	if updateExisting {
-		a.logger.Info(fmt.Sprintf(
-			"Contract '%s' updated on the account '%s'.",
-			contractName,
-			account.Address(),
-		))
+		a.logger.Info(fmt.Sprintf("Contract '%s' updated on the account '%s'.", contractName, account.Address()))
 	} else {
-		a.logger.Info(fmt.Sprintf(
-			"Contract '%s' deployed to the account '%s'.",
-			contractName,
-			account.Address(),
-		))
+		a.logger.Info(fmt.Sprintf("Contract '%s' deployed to the account '%s'.", contractName, account.Address()))
 	}
 
 	return update, err
 }
 
-// RemoveContracts removes a contract from an account and returns the updated account.
+// RemoveContracts removes a contract from the account
 func (a *Accounts) RemoveContract(
 	contractName string,
 	accountName string,
@@ -415,6 +408,27 @@ func (a *Accounts) RemoveContract(
 		return nil, fmt.Errorf("account: [%s] doesn't exists in configuration", accountName)
 	}
 
+	return a.removeContract(contractName, account)
+}
+
+// RemoveContractForAddress removes contract from address using private key
+func (a *Accounts) RemoveContractForAddress(
+	contractName string,
+	accountAddress string,
+	accountPrivateKey string,
+) (*flow.Account, error) {
+	account, err := accountFromAddressAndKey(accountAddress, accountPrivateKey)
+	if err != nil {
+		return nil, err
+	}
+
+	return a.removeContract(contractName, account)
+}
+
+func (a *Accounts) removeContract(
+	contractName string,
+	account *project.Account,
+) (*flow.Account, error) {
 	a.logger.StartProgress(
 		fmt.Sprintf("Removing Contract %s from %s...", contractName, account.Address()),
 	)
@@ -439,3 +453,16 @@ func (a *Accounts) RemoveContract(
 
 	return a.gateway.GetAccount(account.Address())
 }
+
+// AccountFromAddressAndKey get account from address and private key
+func accountFromAddressAndKey(address string, accountPrivateKey string) (*project.Account, error) {
+	privateKey, err := crypto.DecodePrivateKeyHex(crypto.ECDSA_P256, accountPrivateKey)
+	if err != nil {
+		return nil, fmt.Errorf("private key is not correct")
+	}
+
+	return project.AccountFromAddressAndKey(
+		flow.HexToAddress(address),
+		privateKey,
+	), nil
+}
diff --git a/pkg/flowcli/services/blocks.go b/pkg/flowcli/services/blocks.go
index b9126241..e481d719 100644
--- a/pkg/flowcli/services/blocks.go
+++ b/pkg/flowcli/services/blocks.go
@@ -30,14 +30,14 @@ import (
 	"github.com/onflow/flow-cli/pkg/flowcli/project"
 )
 
-// Blocks is a service that handles all block-related interactions.
+// Blocks service handles all interactions for blocks
 type Blocks struct {
 	gateway gateway.Gateway
 	project *project.Project
 	logger  output.Logger
 }
 
-// NewBlocks returns a new blocks service.
+// NewBlocks create new block service
 func NewBlocks(
 	gateway gateway.Gateway,
 	project *project.Project,
@@ -50,12 +50,7 @@ func NewBlocks(
 	}
 }
 
-// GetBlock returns a block based on the provided query string.
-//
-// Query string options:
-// - "latest"                : return the latest block
-// - height (e.g. 123456789) : return block at this height
-// - ID                      : return block with this ID
+// Get the block
 func (e *Blocks) GetBlock(
 	query string,
 	eventType string,
diff --git a/pkg/flowcli/services/collections.go b/pkg/flowcli/services/collections.go
index f191c035..5745f713 100644
--- a/pkg/flowcli/services/collections.go
+++ b/pkg/flowcli/services/collections.go
@@ -26,14 +26,14 @@ import (
 	"github.com/onflow/flow-cli/pkg/flowcli/project"
 )
 
-// Collections is aa service that handles all collection-related interactions.
+// Collections service handles all interactions for collections
 type Collections struct {
 	gateway gateway.Gateway
 	project *project.Project
 	logger  output.Logger
 }
 
-// NewCollections returns a new collections service.
+// NewCollections create new collection service
 func NewCollections(
 	gateway gateway.Gateway,
 	project *project.Project,
@@ -46,7 +46,7 @@ func NewCollections(
 	}
 }
 
-// Get returns a collection by ID.
+// Get collection
 func (c *Collections) Get(id string) (*flow.Collection, error) {
 	collectionID := flow.HexToID(id)
 	return c.gateway.GetCollection(collectionID)
diff --git a/pkg/flowcli/services/events.go b/pkg/flowcli/services/events.go
index 3a4607d8..47cdd4dd 100644
--- a/pkg/flowcli/services/events.go
+++ b/pkg/flowcli/services/events.go
@@ -29,14 +29,14 @@ import (
 	"github.com/onflow/flow-cli/pkg/flowcli/project"
 )
 
-// Events is a service that handles all event-related interactions.
+// Events service handles all interactions for scripts
 type Events struct {
 	gateway gateway.Gateway
 	project *project.Project
 	logger  output.Logger
 }
 
-// NewEvents returns a new events service.
+// NewEvents create new event service
 func NewEvents(
 	gateway gateway.Gateway,
 	project *project.Project,
@@ -49,7 +49,7 @@ func NewEvents(
 	}
 }
 
-// Get queries for an event by name and block range.
+// Get an event
 func (e *Events) Get(name string, start string, end string) ([]client.BlockEvents, error) {
 	if name == "" {
 		return nil, fmt.Errorf("cannot use empty string as event name")
diff --git a/pkg/flowcli/services/keys.go b/pkg/flowcli/services/keys.go
index e2a67a98..fbb38ade 100644
--- a/pkg/flowcli/services/keys.go
+++ b/pkg/flowcli/services/keys.go
@@ -31,14 +31,14 @@ import (
 	"github.com/onflow/flow-cli/pkg/flowcli/util"
 )
 
-// Keys is a service that handles all key-related interactions.
+// Keys service handles all interactions for keys
 type Keys struct {
 	gateway gateway.Gateway
 	project *project.Project
 	logger  output.Logger
 }
 
-// NewKeys returns a new keys service.
+// NewTransactions create new transaction service
 func NewKeys(
 	gateway gateway.Gateway,
 	project *project.Project,
@@ -51,7 +51,6 @@ func NewKeys(
 	}
 }
 
-// Generate generates a new private key from the given seed and signature algorithm.
 func (k *Keys) Generate(inputSeed string, signatureAlgo string) (*crypto.PrivateKey, error) {
 	var seed []byte
 	var err error
diff --git a/pkg/flowcli/services/project.go b/pkg/flowcli/services/project.go
index dbef62ae..dd1c3b05 100644
--- a/pkg/flowcli/services/project.go
+++ b/pkg/flowcli/services/project.go
@@ -33,14 +33,14 @@ import (
 	"github.com/onflow/flow-cli/pkg/flowcli/util"
 )
 
-// Project is a service that handles all interactions for a project.
+// Project service handles all interactions for project
 type Project struct {
 	gateway gateway.Gateway
 	project *project.Project
 	logger  output.Logger
 }
 
-// NewProject returns a new project service.
+// NewProject create new project service
 func NewProject(
 	gateway gateway.Gateway,
 	project *project.Project,
@@ -53,12 +53,7 @@ func NewProject(
 	}
 }
 
-func (p *Project) Init(
-	reset bool,
-	serviceKeySigAlgo string,
-	serviceKeyHashAlgo string,
-	servicePrivateKey string,
-) (*project.Project, error) {
+func (p *Project) Init(reset bool, serviceKeySigAlgo string, serviceKeyHashAlgo string, servicePrivateKey string) (*project.Project, error) {
 	if !project.Exists(project.DefaultConfigPath) || reset {
 
 		sigAlgo, hashAlgo, err := util.ConvertSigAndHashAlgo(serviceKeySigAlgo, serviceKeyHashAlgo)
@@ -86,25 +81,20 @@ func (p *Project) Init(
 		}
 
 		return proj, nil
+	} else {
+		return nil, fmt.Errorf("configuration already exists at: %s, if you want to reset configuration use the reset flag", project.DefaultConfigPath)
 	}
-
-	return nil, fmt.Errorf(
-		"configuration already exists at: %s, if you want to reset configuration use the reset flag",
-		project.DefaultConfigPath,
-	)
 }
 
 func (p *Project) Deploy(network string, update bool) ([]*contracts.Contract, error) {
 	if p.project == nil {
-		return nil, fmt.Errorf("missing configuration, initialize it: flow init")
+		return nil, fmt.Errorf("missing configuration, initialize it: flow project init")
 	}
 
 	// check there are not multiple accounts with same contract
 	// TODO: specify which contract by name is a problem
 	if p.project.ContractConflictExists(network) {
-		return nil, fmt.Errorf(
-			"the same contract cannot be deployed to multiple accounts on the same network",
-		)
+		return nil, fmt.Errorf("currently it is not possible to deploy same contract with multiple accounts, please check Deployments in config and make sure a contract is only present in one account")
 	}
 
 	processor := contracts.NewPreprocessor(
@@ -134,7 +124,7 @@ func (p *Project) Deploy(network string, update bool) ([]*contracts.Contract, er
 	}
 
 	p.logger.Info(fmt.Sprintf(
-		"Deploying %d contracts for accounts: %s",
+		"Deploying %v contracts for accounts: %s",
 		len(contracts),
 		strings.Join(p.project.AllAccountName(), ","),
 	))
@@ -158,8 +148,7 @@ func (p *Project) Deploy(network string, update bool) ([]*contracts.Contract, er
 		if exists {
 			if !update {
 				p.logger.Error(fmt.Sprintf(
-					"Contract %s is already deployed to this account. Use the --update flag to force update.",
-					contract.Name(),
+					"Contract %s is already deployed to account, use --update flag to force update.", contract.Name(),
 				))
 				continue
 			}
diff --git a/pkg/flowcli/services/scripts.go b/pkg/flowcli/services/scripts.go
index c2f6973f..3223b76b 100644
--- a/pkg/flowcli/services/scripts.go
+++ b/pkg/flowcli/services/scripts.go
@@ -28,14 +28,14 @@ import (
 	"github.com/onflow/flow-cli/pkg/flowcli/util"
 )
 
-// Scripts is a service that handles all script-related interactions.
+// Scripts service handles all interactions for scripts
 type Scripts struct {
 	gateway gateway.Gateway
 	project *project.Project
 	logger  output.Logger
 }
 
-// NewScripts returns a new scripts service.
+// NewScripts create new script service
 func NewScripts(
 	gateway gateway.Gateway,
 	project *project.Project,
@@ -48,7 +48,7 @@ func NewScripts(
 	}
 }
 
-// Execute executes a Cadence script from a file.
+// Execute script
 func (s *Scripts) Execute(scriptFilename string, args []string, argsJSON string) (cadence.Value, error) {
 	script, err := util.LoadFile(scriptFilename)
 	if err != nil {
@@ -58,7 +58,6 @@ func (s *Scripts) Execute(scriptFilename string, args []string, argsJSON string)
 	return s.execute(script, args, argsJSON)
 }
 
-// Execute executes a Cadence script from a source code string.
 func (s *Scripts) ExecuteWithCode(code []byte, args []string, argsJSON string) (cadence.Value, error) {
 	return s.execute(code, args, argsJSON)
 }
diff --git a/pkg/flowcli/services/services.go b/pkg/flowcli/services/services.go
index c93cf25a..f717040f 100644
--- a/pkg/flowcli/services/services.go
+++ b/pkg/flowcli/services/services.go
@@ -24,8 +24,7 @@ import (
 	"github.com/onflow/flow-cli/pkg/flowcli/project"
 )
 
-// Services is a collection of services that provide domain-specific functionality
-// for the different components of a Flow project.
+// Services are a place where we define domain functionality
 type Services struct {
 	Accounts     *Accounts
 	Scripts      *Scripts
@@ -37,8 +36,7 @@ type Services struct {
 	Blocks       *Blocks
 }
 
-// NewServices returns a new services collection for a project,
-// initialized with a gateway and logger.
+// NewServices create new services with gateway and project
 func NewServices(
 	gateway gateway.Gateway,
 	proj *project.Project,
diff --git a/pkg/flowcli/services/transactions.go b/pkg/flowcli/services/transactions.go
index 2cd1ee8f..40326e1d 100644
--- a/pkg/flowcli/services/transactions.go
+++ b/pkg/flowcli/services/transactions.go
@@ -33,14 +33,14 @@ import (
 	"github.com/onflow/flow-cli/pkg/flowcli/util"
 )
 
-// Transactions is a service that handles all transaction-related interactions.
+// Scripts service handles all interactions for transactions
 type Transactions struct {
 	gateway gateway.Gateway
 	project *project.Project
 	logger  output.Logger
 }
 
-// NewTransactions returns a new transactions service.
+// NewTransactions create new transaction service
 func NewTransactions(
 	gateway gateway.Gateway,
 	project *project.Project,
@@ -53,7 +53,7 @@ func NewTransactions(
 	}
 }
 
-// Send sends a transaction from a file.
+// Send transaction
 func (t *Transactions) Send(
 	transactionFilename string,
 	signerName string,
@@ -61,7 +61,7 @@ func (t *Transactions) Send(
 	argsJSON string,
 ) (*flow.Transaction, *flow.TransactionResult, error) {
 	if t.project == nil {
-		return nil, nil, fmt.Errorf("missing configuration, initialize it: flow init")
+		return nil, nil, fmt.Errorf("missing configuration, initialize it: flow project init")
 	}
 
 	signer := t.project.AccountByName(signerName)
@@ -77,23 +77,7 @@ func (t *Transactions) Send(
 	return t.send(code, signer, args, argsJSON)
 }
 
-// SendForAddress send transaction for address and private key, code passed via filename
-func (t *Transactions) SendForAddress(
-	transactionFilename string,
-	signerAddress string,
-	signerPrivateKey string,
-	args []string,
-	argsJSON string,
-) (*flow.Transaction, *flow.TransactionResult, error) {
-	code, err := util.LoadFile(transactionFilename)
-	if err != nil {
-		return nil, nil, err
-	}
-
-	return t.SendForAddressWithCode(code, signerAddress, signerPrivateKey, args, argsJSON)
-}
-
-// SendForAddressWithCode send transaction for address and private key, code passed via byte array
+// SendForAddressWithCode send transaction for address and private key specified with code
 func (t *Transactions) SendForAddressWithCode(
 	code []byte,
 	signerAddress string,
@@ -120,8 +104,7 @@ func (t *Transactions) send(
 	argsJSON string,
 ) (*flow.Transaction, *flow.TransactionResult, error) {
 
-	// if google kms account then sign in
-	// TODO discuss refactor - move to account
+	// if google kms account then sign in TODO discuss refactor - move to account
 	if signer.DefaultKey().Type() == config.KeyTypeGoogleKMS {
 		resourceID := signer.DefaultKey().ToConfig().Context[config.KMSContextField]
 		err := util.GcloudApplicationSignin(resourceID)
@@ -130,7 +113,7 @@ func (t *Transactions) send(
 		}
 	}
 
-	t.logger.StartProgress("Sending transaction...")
+	t.logger.StartProgress("Sending Transaction...")
 
 	tx := flow.NewTransaction().
 		SetScript(code).
diff --git a/pkg/flowcli/txsender/txsender.go b/pkg/flowcli/txsender/txsender.go
new file mode 100644
index 00000000..417f12b7
--- /dev/null
+++ b/pkg/flowcli/txsender/txsender.go
@@ -0,0 +1,162 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package txsender
+
+import (
+	"context"
+	"time"
+
+	"github.com/onflow/flow-go-sdk"
+	"github.com/onflow/flow-go-sdk/client"
+
+	"github.com/onflow/flow-cli/pkg/flowcli/project"
+)
+
+const (
+	defaultGasLimit           = 1000
+	defaultResultPollInterval = time.Second
+)
+
+type Sender struct {
+	client *client.Client
+}
+
+func NewSender(c *client.Client) *Sender {
+	return &Sender{
+		client: c,
+	}
+}
+
+func (s *Sender) Send(
+	ctx context.Context,
+	tx *flow.Transaction,
+	signer *project.Account,
+) <-chan Result {
+
+	result := make(chan Result)
+
+	go func() {
+		txResult, err := s.send(ctx, tx, signer)
+		result <- Result{
+			txResult: txResult,
+			err:      err,
+		}
+	}()
+
+	return result
+}
+
+func (s *Sender) send(
+	ctx context.Context,
+	tx *flow.Transaction,
+	signer *project.Account,
+) (*flow.TransactionResult, error) {
+
+	latestSealedBlock, err := s.client.GetLatestBlockHeader(ctx, true)
+	if err != nil {
+		return nil, err
+	}
+
+	seqNo, err := s.getSequenceNumber(ctx, signer)
+	if err != nil {
+		return nil, err
+	}
+
+	tx.SetGasLimit(defaultGasLimit).
+		SetPayer(signer.Address()).
+		SetProposalKey(signer.Address(), signer.DefaultKey().Index(), seqNo).
+		SetReferenceBlockID(latestSealedBlock.ID)
+
+	sig, err := signer.DefaultKey().Signer(context.Background())
+	if err != nil {
+		return nil, err
+	}
+
+	err = tx.SignEnvelope(signer.Address(), signer.DefaultKey().Index(), sig)
+	if err != nil {
+		return nil, err
+	}
+
+	err = s.client.SendTransaction(ctx, *tx)
+	if err != nil {
+		return nil, err
+	}
+
+	result, err := s.waitForSeal(ctx, tx.ID())
+	if err != nil {
+		return nil, err
+	}
+
+	return result, nil
+}
+
+func (s *Sender) waitForSeal(
+	ctx context.Context,
+	id flow.Identifier,
+) (*flow.TransactionResult, error) {
+	result, err := s.client.GetTransactionResult(ctx, id)
+	if err != nil {
+		return nil, err
+	}
+
+	for result.Status != flow.TransactionStatusSealed {
+		time.Sleep(defaultResultPollInterval)
+
+		result, err = s.client.GetTransactionResult(ctx, id)
+		if err != nil {
+			return nil, err
+		}
+	}
+
+	return result, nil
+}
+
+func (s *Sender) getSequenceNumber(ctx context.Context, account *project.Account) (uint64, error) {
+	accountResult, err := s.client.GetAccount(ctx, account.Address())
+	if err != nil {
+		return 0, err
+	}
+
+	keyIndex := account.DefaultKey().Index()
+
+	accountKey := accountResult.Keys[keyIndex]
+
+	return accountKey.SequenceNumber, nil
+}
+
+type Result struct {
+	txResult *flow.TransactionResult
+	err      error
+}
+
+func (r *Result) Error() error {
+	if r.err != nil {
+		return r.err
+	}
+
+	if r.txResult.Error != nil {
+		return r.txResult.Error
+	}
+
+	return nil
+}
+
+func (r *Result) TransactionResult() *flow.TransactionResult {
+	return r.txResult
+}
diff --git a/pkg/flowcli/util/cli.go b/pkg/flowcli/util/cli.go
index c79238c6..4d3d98a5 100644
--- a/pkg/flowcli/util/cli.go
+++ b/pkg/flowcli/util/cli.go
@@ -33,6 +33,8 @@ const (
 	EnvPrefix = "FLOW"
 )
 
+var ConfigPath = []string{"flow.json"}
+
 func Exit(code int, msg string) {
 	fmt.Println(msg)
 	os.Exit(code)
@@ -72,9 +74,7 @@ func GcloudApplicationSignin(resourceID string) error {
 
 	proj := kms.ProjectID
 	if len(proj) == 0 {
-		return fmt.Errorf(
-			"could not get GOOGLE_APPLICATION_CREDENTIALS, no google service account JSON provided but private key type is KMS",
-		)
+		return fmt.Errorf("could not get GOOGLE_APPLICATION_CREDENTIALS, no google service account JSON provided but private key type is KMS")
 	}
 
 	loginCmd := exec.Command("gcloud", "auth", "application-default", "login", fmt.Sprintf("--project=%s", proj))
@@ -83,7 +83,6 @@ func GcloudApplicationSignin(resourceID string) error {
 	if err != nil {
 		return fmt.Errorf("Failed to run %q: %s\n", loginCmd.String(), err)
 	}
-
 	regexResult := squareBracketRegex.FindAllStringSubmatch(string(output), -1)
 	// Should only be one value. Second index since first index contains the square brackets
 	googleApplicationCreds := regexResult[0][1]
diff --git a/pkg/flowcli/util/utilities.go b/pkg/flowcli/util/utilities.go
index da14ec42..27069a21 100644
--- a/pkg/flowcli/util/utilities.go
+++ b/pkg/flowcli/util/utilities.go
@@ -32,7 +32,7 @@ var Green = color.New(color.FgGreen, color.Bold).SprintfFunc()
 var Red = color.New(color.FgRed, color.Bold).SprintfFunc()
 var Bold = color.New(color.Bold).SprintfFunc()
 
-// LoadFile loads a file by filename.
+// LoadFile loads file from filename
 func LoadFile(filename string) ([]byte, error) {
 	var code []byte
 	var err error
@@ -56,40 +56,35 @@ func IsByteSlice(v interface{}) bool {
 	return isBytes
 }
 
-// ConvertSigAndHashAlgo parses and validates a signature and hash algorithm pair.
+// ConvertSigAndHashAlgo converts signature and hashing algorithm from string and do validation
 func ConvertSigAndHashAlgo(
 	signatureAlgorithm string,
 	hashingAlgorithm string,
 ) (crypto.SignatureAlgorithm, crypto.HashAlgorithm, error) {
 	sigAlgo := crypto.StringToSignatureAlgorithm(signatureAlgorithm)
 	if sigAlgo == crypto.UnknownSignatureAlgorithm {
-		return crypto.UnknownSignatureAlgorithm,
-			crypto.UnknownHashAlgorithm,
-			fmt.Errorf("failed to determine signature algorithm from %s", sigAlgo)
+		return crypto.UnknownSignatureAlgorithm, crypto.UnknownHashAlgorithm, fmt.Errorf("failed to determine signature algorithm from %s", sigAlgo)
 	}
 
 	hashAlgo := crypto.StringToHashAlgorithm(hashingAlgorithm)
 	if hashAlgo == crypto.UnknownHashAlgorithm {
-		return crypto.UnknownSignatureAlgorithm,
-			crypto.UnknownHashAlgorithm,
-			fmt.Errorf("failed to determine hash algorithm from %s", hashAlgo)
+		return crypto.UnknownSignatureAlgorithm, crypto.UnknownHashAlgorithm, fmt.Errorf("failed to determine hash algorithm from %s", hashAlgo)
 	}
 
 	return sigAlgo, hashAlgo, nil
 }
 
-// StringContains returns true if the slice contains the given string.
+// StringContains check if string slice contains string
 func StringContains(s []string, e string) bool {
 	for _, a := range s {
 		if a == e {
 			return true
 		}
 	}
-
 	return false
 }
 
-// GetAddressNetwork returns the chain ID for an address.
+// GetAddressNetwork get chain id based on address
 func GetAddressNetwork(address flow.Address) (flow.ChainID, error) {
 	networks := []flow.ChainID{
 		flow.Mainnet,
@@ -102,5 +97,5 @@ func GetAddressNetwork(address flow.Address) (flow.ChainID, error) {
 		}
 	}
 
-	return "", fmt.Errorf("address not valid for any known chain: %s", address)
+	return flow.ChainID(""), fmt.Errorf("unrecognized address not valid for any known chain: %s", address)
 }
diff --git a/pkg/flowcli/values.go b/pkg/flowcli/values.go
index 7c6cd78e..b9301f3d 100644
--- a/pkg/flowcli/values.go
+++ b/pkg/flowcli/values.go
@@ -1,3 +1,21 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package flowcli
 
 import (


Test patch:
diff --git a/pkg/flowcli/config/config_test.go b/pkg/flowcli/config/config_test.go
index a3c784d4..ee503454 100644
--- a/pkg/flowcli/config/config_test.go
+++ b/pkg/flowcli/config/config_test.go
@@ -155,6 +155,15 @@ func Test_GetAccountByNameComplex(t *testing.T) {
 	assert.Equal(t, acc.Address.String(), "f8d6e0586b0a20c1")
 }
 
+func Test_GetAccountByAddressComplex(t *testing.T) {
+	conf := generateComplexConfig()
+	acc1 := conf.Accounts.GetByAddress("f8d6e0586b0a20c1")
+	acc2 := conf.Accounts.GetByAddress("2c1162386b0a245f")
+
+	assert.Equal(t, acc1.Name, "account-4")
+	assert.Equal(t, acc2.Name, "account-2")
+}
+
 func Test_GetDeploymentsByNetworkComplex(t *testing.T) {
 	conf := generateComplexConfig()
 	deployments := conf.Deployments.GetByAccountAndNetwork("account-2", "testnet")
diff --git a/pkg/flowcli/events_test.go b/pkg/flowcli/events_test.go
index bb4a1ffe..6ce0f726 100644
--- a/pkg/flowcli/events_test.go
+++ b/pkg/flowcli/events_test.go
@@ -1,3 +1,21 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package flowcli_test
 
 import (
diff --git a/pkg/flowcli/services/accounts_test.go b/pkg/flowcli/services/accounts_test.go
index 020eeebc..2a7f0b14 100644
--- a/pkg/flowcli/services/accounts_test.go
+++ b/pkg/flowcli/services/accounts_test.go
@@ -1,3 +1,21 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package services
 
 import (
diff --git a/pkg/flowcli/services/blocks_test.go b/pkg/flowcli/services/blocks_test.go
index 88faa7f2..a98f555c 100644
--- a/pkg/flowcli/services/blocks_test.go
+++ b/pkg/flowcli/services/blocks_test.go
@@ -1,3 +1,21 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package services
 
 import (
diff --git a/pkg/flowcli/services/collections_test.go b/pkg/flowcli/services/collections_test.go
index cb7240ee..5fda78b7 100644
--- a/pkg/flowcli/services/collections_test.go
+++ b/pkg/flowcli/services/collections_test.go
@@ -1,3 +1,21 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package services
 
 import (
diff --git a/pkg/flowcli/services/events_test.go b/pkg/flowcli/services/events_test.go
index d3611e5b..4744d801 100644
--- a/pkg/flowcli/services/events_test.go
+++ b/pkg/flowcli/services/events_test.go
@@ -1,3 +1,21 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package services
 
 import (
@@ -71,4 +89,5 @@ func TestEvents(t *testing.T) {
 		_, err := events.Get("test", "10", "5")
 		assert.Equal(t, err.Error(), "cannot have end height (5) of block range less that start height (10)")
 	})
+
 }
diff --git a/pkg/flowcli/services/keys_test.go b/pkg/flowcli/services/keys_test.go
index afc98660..59a7806c 100644
--- a/pkg/flowcli/services/keys_test.go
+++ b/pkg/flowcli/services/keys_test.go
@@ -1,3 +1,21 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package services
 
 import (
diff --git a/pkg/flowcli/services/scripts_test.go b/pkg/flowcli/services/scripts_test.go
index 6a551cca..47c6778f 100644
--- a/pkg/flowcli/services/scripts_test.go
+++ b/pkg/flowcli/services/scripts_test.go
@@ -1,3 +1,21 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package services
 
 import (
diff --git a/pkg/flowcli/services/transactions_test.go b/pkg/flowcli/services/transactions_test.go
index eee98aef..488db924 100644
--- a/pkg/flowcli/services/transactions_test.go
+++ b/pkg/flowcli/services/transactions_test.go
@@ -1,3 +1,21 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package services
 
 import (
@@ -94,7 +112,7 @@ func TestTransactions(t *testing.T) {
 
 	t.Run("Send Transaction Fails wrong args", func(t *testing.T) {
 		_, _, err := transactions.Send("../../../tests/transaction.cdc", serviceName, []string{"Bar"}, "")
-		assert.Equal(t, err.Error(), "argument not passed in correct format, correct format is: Type:Value, got Bar")
+		assert.Equal(t, err.Error(), "Argument not passed in correct format, correct format is: Type:Value, got Bar")
 	})
 
 	t.Run("Send Transaction Fails wrong filename", func(t *testing.T) {
diff --git a/tests/fixtures.go b/tests/fixtures.go
index 70385334..02896c26 100644
--- a/tests/fixtures.go
+++ b/tests/fixtures.go
@@ -1,3 +1,21 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package tests
 
 import (
diff --git a/tests/mockGateway.go b/tests/mockGateway.go
index a36f9be8..0a4a08be 100644
--- a/tests/mockGateway.go
+++ b/tests/mockGateway.go
@@ -1,3 +1,21 @@
+/*
+ * Flow CLI
+ *
+ * Copyright 2019-2021 Dapper Labs, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package tests
 
 import (